Most molding I've seen in this area of fifth wheels is outside corner molding with a trim insert. The molding is usually screwed to the frame bottom of the overhang. Hard to tell from the pic if this is what you have, or if yours is just decorative trim glued to the corner.
It does look like several attempts have been made to reattach the molding with some type of caulking.
Is the panel on the underneath of the overhang also coming loose? Have you inspected your fifth wheel front frame to ensure there is nothing bent? Is there water damage in the side panels?
Might be time to have a good independent RV service shop look at it and give you an estimate.
As to how much it will cost, it's impossible to guesstimate from that picture what actually caused the damage and if it is more than cosmetic.
Good luck and keep us in the loop as you move forward.
Scott and Liz - Southern NM
2012 Wildcat Sterling 32RL - w/level up (best option ever)
2007 Chevy 2500HD 4dr short bed Duramax w/allison
Reese Fifth Airborne air ride king pin coupler with Sidewinder