took out the window. surprise. rust!

Oooo man. Now I'm lost. Finally got the windshield gaskets so after I take out the rear window and on the passenger side bottom of the window it is rotted out. Here's some pics any idea of a way to go about fixing this?