If he can't get out of there, you'll have to take that part out and get him out so he can't get hurt. When you put that grate thing back, you might want to use some plastic zip ties to attach it to the side of the cage so that he can't get behind it again.
Did you try gently nudging him from the bottom to encourage him to climb. It looks like he has room to go forward to get free. The wood lattice is going to have to go, it is creating the trap with the angle it is set to the screen.