You have to enter when the guard is heading towards the screen top.
Go right and hide behind wall in room to right.
Once the guard comes back down and goes left or down, go upscreen.