Where is the Internet connection coming from for your two routers?
Printers with a wi-fi connection have to be configured for a specific wi-fi router including its SSID and the IP address that it was configured to have on that routers network. You printer is going to keep trying to connect with the wi-fi router that it was set up for.
Newer printers have setup capability to find a wi-fi connection and lead you through connecting to that network that results in the printer knowing the SSID and it's IP address on that network for connection.
In your case where your two routers seem to be in range of each other, they need different SSID names.
In other words, your printer would have to have the same capability that a laptop does, i.e. a menu to select the wi-fi router/network to connect to.
So unless you have a printer smarter than my Epson, you are not going to be able to automate this switch of routers. You probably will have to go through the wi-fi connection setup each time you want to swap from in the house and in the RV. There may be more upscale printers that are configurable to handle two different connections automatically, but I haven't spent enough money to have one.