Basic RV water system.......

Some RVs have a 'water panel' where you turn valves to *provide city water, *fill fresh water tank, *bypass water heater etc.
Some RVs fill fresh water tank via gravity port on side of rig
ALL RV water systems are connected.........city water & on-board pump supply the same hot/cold plumbing.
You stated tank overflowed.....so water got to tank.
Need to check valving arrangement.......if 'fill valve' is OPEN, on-board pump will just round robin from tank thru pump thru fill valve back to tank.
Also need to check valving on water heater tank......
Top line (hot out) open
Bottom line (cold in) open
ANY line connecting hot/cold CLOSED