Hi,
there may be some issues.
1) your schematic includes no GND symbol, thus we don´t know where to reference voltages.
2) a MOSFET decides ON/OFF according it´s V_GS. V_GS means voltage between gate and source.
Since the source in your case is at 12V, you need to drive the gate HIGHER than 12V to make the MOSFET switch ON.
We don´t know your SW1 input voltage ... thus we don´t know if your circuit will operate correctly.
3) As shown in the symbol a MOSFET includes a diode. Thus if you SWITCH ON the higher battery voltage it may automatically cause to "charge" the lower voltage battery. Maybe you want it this way, maybe not.
We don´t know your load current, thus we can´t validate proper circuit operation, nor can we give detailed assistance / recommendations.
We don´t know how your switch is driven. If it is a real mechanical switch, then just use it to select between batteries. no MOSFETs, resistors required.
If it´s not a real switch, then tell us how it really is
***
Btw: the schematic is hard to read. The batteries are drawn upside down. Usually the most negative (supply) voltage is in the lower part of the schematic, the most high (supply) voltage is at the upper part of the schematic. Singal flow, power flow, informatin flow .. should be left-to-right.
Klaus