As she was not a skilled flier like the boys were, she rode solo while Ron and Goyle were together on a broom and Harry and Draco on the other. They’d made it through the door just as the basilisk’s jaw snapped at the ends of their broom and caused them to burn. Hermione had slammed the door shut with a wave of her wand, sealing the Fiendfyre inside.