Neville opened the door thinking it was the house elf again.
When he saw Hermione and heard her answer his last question he immediately shut the door and locked it behind him.
The room he'd been staying in was an empty dorm he thought might have been for staff or a guest at some point. When he found it though, it had obviously been abandoned for a while. It was a small dingy room with no windows and little furniture, only a bed a table and his trunk, which he'd dragged there while most people were in classes. As shabby as it may have been it had a bed and it was far away from others, which is all he wanted.