You have to enter when the guard is heading towards the screen top.
Go right and hide behind wall in room to right.