Problem 5. Vasya and Petya live in the mountains and love to visit each other. When climbing up the mountain, they walk at a speed of 3 km/h, and when descending, they walk at a speed of 6 km/h (there are no horizontal road sections). Vasya calculated that it takes him 2 hours and 30 minutes to get to Petya's, and 3 hours and 30 minutes to return. What is the distance between Vasya's and Petya's houses?
Answer: 12 km.

Solution. The journey from Petya to Vasya and back takes 6 hours, during which, as it is twice as slow to go uphill as downhill, the boys spend twice as much time on all ascents as on descents.

Thus, if traveling from Petya to Vasya and back, 2 hours will be spent on descents, and 4 hours on ascents, meaning the length of such a route is $(6 \cdot 2 + 4 \cdot 3) = 24$ km.

Therefore, the distance from Petya to Vasya is 12 km.

## Criteria

1 6. Only the correct answer without justification.

2 6. The problem is solved only for a specific case, for example, if there is exactly one ascent and one descent between Petya and Vasya.

4 b. The correct answer and justification are provided.