This is somewhat similar to my thread that talks about "cojoining" the RV solar to a Home's power system
The issues involve lower voltage but high amperage connections between the RV and the "other" (golf cart or house). And matching battery volts between the two battery systems.
Taking things one click at a time:
As the batteries will certainly be different capacity, age, location, temperature, and charge state, then let's assume to charge them from solar requires a dedicated (to the golf cart) solar charger. Each battery in the bank should be monitored and the system balanced like any other solar charged bank.
Then, there needs to be interconnects between the RV solar array and the golf cart BCC charger / batteries. Inbetween is a type of switch to choose which bank the solar is connected to (RV pack or golf cart pack). Then there are reasonably heavy though flexible cables and quick connections to the Cart (that's the easy part). The switch can be manual or a "smart relay" or a "monitored smart relay" to switch which battery pack is being charged.
If the voltage of RV and golf cart battery packs are same, then the golf cart batteries can be wired (via the "switch) to the RV batteries in parallel to increase RV use capacity (when the golf cart is "docked"). This has to be done so the charging circuit isn't affected (haven't thought that one out yet...maybe a diode based system...).
If the battery packs aren't same voltage (likely), then it would be even more difficult to reconfigure batteries so they are same....
Anyway, the above would be a PITA to implement.
My thought on RV to house sharing is to do this at the 110volt level. I am partnered with a solar company who says they have the hardware to do so. They call it an "inverter", but it does more than just invert. It also blends capacity from one source or the other depending on rules ie: use solar when it's available, and if not enough, then blend in utility grid power for the current needs.
That's the only practical way I can think this would work. And yes, there will be some conversion losses along the way.