Hermione could well imagine Hannah using her time in this room to talk to him, to earn his trust, so that he’d eventually give her the opportunity to escape.  She’d taken the chance when they were close to the place most familiar to her.  Badass.