The stabbing victims, two men and a woman, were expected to survive after the attacks on two subway platforms, officials said.