With just extension cord plugged in does their breaker trip or stay ON?
Are you turning your RV MAIN breaker OFF (not just the individual circuit breakers) when trying to use your power cord and extension cord?
If the house breaker doesn't trip with just extension cord plugged in and does trip when you plug into your power cord (With the MAIN Breaker OFF in RV)
then it does point to your power cord being problem.
Check the plug on your power cord......burnt/scorched prongs.
If your cord is hardwired check connections for loose/bad connections
Also check connections at transfer switch (OK power from gen...but not shore power)
IF your cord unplugs from RV.check receptacle on RV and the plug on that end of cord....loose/burnt connections
You could do a continuity check on each leg in cord
Cut off plug on cord and replace
Replace the whole cord
And WHY is a 50A circuit being feed from a 40A breaker.......wrong size wire?