I can’t see if the front side is deformed from the water. However, if you remove that piece of molding, dry it out completely, you will see what you are working with. Once dry, scrape the crusty fiberboard off down to something that will be solid. We, as cabinet install/repair will use bondo to fill the gap and restore it to it’s original shape. Paint a colored base coat and faux finish to match the existing.
I would love to replace all the junk wood in my camper with real wood. That would be a fortune.
2003 Ford F-250 7.3 (489,000 miles)
***Closing in on one half million miles***