When one student gave him $5, the man pulled out a pistol, police said. Then, he and another suspect got into one of the victim’s cars and told them to give him their cellphones.