Need help for using N-Mosfets to switch on either one battery or the other
This means at 25A the mosfet will dissipate 1.875 W. This should be
  okay without heat sink because the mosfet can be used without heatsink
  up to 3.5 W at an ambient temperature of 35°C.


RthJA of the SUP60020E is 40&deg;C/W, so at 1.875W the junction temperature would be 75&deg;C above ambient, ie. 110&deg;C at 35&deg;C. However at this temperature RDSON is 1.5 times higher than at 25&deg;C, so the power dissipation is 1.5 times higher causing temperature to rise by another 38&deg;C. But now RDSON is 1.8 times higher, so... 

Result - one burned FET. Put a heat sink on it!


  What happens if the two batteries don't hold the same charge e.g.
  battery 1 is at 30 V and battery 2 is fully charged at 42 V?


The negative terminal of battery 2 will be 12V lower than battery 1. When FET 2 turns on it will pull FET 1's Drain voltage down below the source, turning on the body diode and connecting the battery negatives together. This will cause a large current to flow until battery 1 charges up to about 0.7V less than battery 2. 

To fully isolate the batteries you need back-to-back FETs, so when one FET's body diode is forward biased the other one is reverse biased.

Next issue is FET 2's Gate will be at 19.1V when turned on, dangerously close to the maximum rating. However FET 1 only gets 7.1V, which is not enough to turn it on fully. If you raise this voltage then FET 2's Gate will go over 20V. This problem can be solved by putting a 10~15V Zener diode between each Gate and Source, and removing R2 so the Zener diode limits the voltage.  

You also need pull-down resistors on the FET Gates to prevent them from 'floating' and turning on unintentionally when the switch is off.

The final circuit would look like this (imagine SW1 and SW2 are a single ON-OFF-ON switch):-







simulate this circuit &ndash; Schematic created using CircuitLab

This circuit is fully symmetrical, so it will work the same no matter which battery has the higher voltage.


  Should I be concerned with voltage spikes and inrush current when
  switching either battery on?


LTspice says when charging 470uF (typical ebike controller bulk capacitance) the turn-on power surge peaks at 24V and 153A, and lasts for less than 100us. This is within the safe operating area of your FETs. The relatively high resistances combined with large Gate capacitance should slow FET turn on/off speed to reduce voltage spikes.