Window needs a new frame

My daughter's bedroom window frame looks rotten and may need replacing if it can't be repaired. Advice on how to fix the window would be helpful. All tools and most of the equipment needed is on site.

This Request belongs to Taranaki Timebank.