How to connect two different networks at different places with 1 server, three hosts, a router and a switch in each network?
You need a router between the two networks, and each network needs a static route pointing to the other network via it's respective router interface. I have used OpenVPN in the past to achieve this but it's not for the faint of heart.
However, many consumer-grade internet routers these days have the ability to connect to each other across the internet and route between LANs, you might start looking at your routers to see if they're capable. If not, new routers which are may the way to go.