Saying that someone is hiding inside the room is logically equivalent to saying that the person sleeping there didn't lock the window when going to sleep.
The culprit had help of at least 2 people other than the culprit who didn't commint a murder.
So the culprit and 2 helpers were hiding each in a room, the culprit killed all 3 and the helpers only opened and locked the doors from the inside.
When the windows were later smashed, they were free to escape.
if the culprit didn't have any help:
All kids left their windows open (it was a hot day after all), the culprit went inside and killed each one of them. (and left the doors closed, but windows open)
The culprit hid in the morning inside Bill's room, where he closed the windown. After hearing the little one leave, he opens the door, and leaves after the little one the guest house.
Then he enters through the window of Bob's room, closes the window and again enters the middle area. There he waits until the little one runs screamingly past the house door, then he exits the guesthouse, goes the other way around and enters Fred's Room, closes the window and leaves through the door.