According to the meaning of the question:
120x- 100x=500
The solution is x=25 (minutes).
A * * * escaped: 120*25=3000 (m)
* * * Rest: 3000/200= 15 (minutes)
Then 15+25=40 (minutes) is needed.