the step pulled loose from the boat!


Does anyone have any suggestions for repairing this? I am new to sailboats in general but I am thinking there is supposed to be some wood support right under the mast step? How would I replace that? I welcome any words of wisdom. I would really like to try my hand at sailing this boat soon but I will obviously have to fix this problem first.
Thanks,