While student one is walking home alone he keeps aware of his surroundings and is aware of anyone around them just as his parents taught him to do.
Once the student notices the stranger, he tries to walk quicker and get to their destination as quickly as possible. The student decides to walk to the near by police station.
Keeps following student until they realize they are being noticed and the student is headed to get help.
"You did the right thing by coming to us. We will make sure you get home safe."
Because the student was aware of their surroundings and knew where the police station was, they got themselves out of a situation that could have been bad if the student was not aware of what to do in this type of situation.