well, it looks like the prongs have broken out of the latching mechanism, that's an easy fix with a new glove box from the wreckers. Just clear out the box, prize out the black plastic pin in the back right corner with a screwdriver, then wiggle the tray out remembering there's another fixed hinge pin on the left side.
Can't really see from the photos but looks like the switch that turns on the light is all mashed up? dunno how you'd fix that. I'd probably just leave it if the light's not on.