Holmes advises Helen to remain in her present room until Dr. Roylott retires for the night. Roylott is a violent man. He might subject Helen to verbal and even physical abuse after learning that she had gone to London to consult Sherlock Holmes. In that case, the frightened girl might confess that Holmes and Watson had been at Stoke Moran that very afternoon. This would force Roylott to abort his plan to murder Helen with his poisonous snake. There is no telling what he might do instead, but he would probably devise some other plan to murder her. He can't afford to let her get married. Then when Helen sends a lighted signal that Roylott has gone to bed, Holmes tells Helen to go back to her old bedroom and stay there. Actually the girl has no place else to go. But she should be out of danger while Holmes and Watson wait in the dark in the bedroom next to Roylott's.
“You must confine yourself to your room, on pretence of a headache, when your stepfather comes back. Then when you hear him retire for the night, you must open the shutters of your window, undo the hasp, put your lamp there as a signal to us, and then withdraw quietly with everything which you are likely to want into the room which you used to occupy. I have no doubt that, in spite of the repairs, you could manage there for one night.”
Holmes knew there would be a ventilator between Roylott's room and the one Helen was temporarily occupying next door because Julia had complained about being able to smell her stepfather's cigar smoke.
“I knew that we should find a ventilator before ever we came to Stoke Moran.”
“My dear Holmes!”
“Oh, yes, I did. You remember in her statement she said that her sister could smell Dr. Roylott's cigar. Now, of course that suggested at once that there must be a communication between the two rooms. It could only be a small one, or it would have been remarked upon at the coroner's inquiry. I deduced a ventilator.”
Dr. Roylott intended to kill Helen in exactly the same way he had killed her twin sister Julia two years earlier. He had gotten away with that murder, and this gave him confidence he could get away with it again. His main problem was to get Helen to move into the bedroom next to his. He needed that ventilator, the dummy bell-rope, and the bed attached to the floor. So he ordered some unnecessary repairs on Helen's bedroom and thereby forced her to move into Julia's former bedroom right next to his. Helen doesn't like sleeping in Julia's room and in Julia's bed for obvious reasons. She would naturally feel the room might be haunted. This fear plus the strange whistle she hears during the night combine to make her hasten to London to consult Sherlock Holmes. Dr. Roylott was wrong in thinking he could get away with the "locked-room-murder" twice.