Hermione had to make the decision to cross over the line. She had to take a chance. Staying behind would keep her safe, but she wouldn't learn how to cloak her magic. Following the wizard might end in her death or he was being truthful. Deciding that she had nothing to lose, she crossed over the wards.