Răspuns :
I think that man enters the window because he is sleep walking or because the door is stuck.
I think that man enters by the window because he is a sleepwalker or because the door got stuck.