1. In answer to his shouts, people ran to help.
2. When answering his shouts, people ran to help.
The first sentence means "People ran to help as an answer to his shouts." The second sentence means "When people answered his shouts, they ran to help." In other words, this sentence emphasizes the "time" when people ran to help.
This is only for your reference.
Student or Learner