The motorhome socket wires plug into the inverter output socket. The existing wire to the sockets you just disconnected from the mcb probably won't reach far enough, so the junction box is just to extend it so it reaches the inverter output.
All the switching happens inside the Renogy inverter. It switches automatically so that the inverter output socket is powered from either the hookup mains or the inverter mains.
All the switching happens inside the Renogy inverter. It switches automatically so that the inverter output socket is powered from either the hookup mains or the inverter mains.