The logic in her plan made sense. She ordered Umbridge to drink the polyjuice potion first. When it was evident that there were no dangerous side effects, Aberforth drank from his own. No more than ten minutes could've passed from the time they entered his cell to when he was ready to exit fully transformed and dressed as Umbridge, but time seemed to pass so slowly. Hermione was terrified that at any moment they were going to be discovered.