VIII.1. The road from Gostivar to Kicevo consists of horizontal sections, ascents, and descents. A cyclist travels this road, with a speed of $10 \mathrm{~km}$ per hour on the horizontal sections, $8 \mathrm{~km}$ per hour on the ascents, and $16 \mathrm{~km}$ per hour on the descents. The cyclist takes 6 hours to travel from Gostivar to Kicevo, and 5 hours to return. If the total length of the horizontal sections is $17.5 \mathrm{~km}$, determine the length of the road between the two cities.
Solution: Let x be the length of the uphill sections, and y the length of the downhill sections. The time of the cyclist in both directions can be represented by the equations: $\frac{17.5}{10}+\frac{x}{8}+\frac{y}{16}=6$ and $\frac{17.5}{10}+\frac{x}{16}+\frac{y}{8}=5$. From solving the system, we get $\mathrm{x}=28 \mathrm{~km}, \mathrm{y}=12 \mathrm{~km}$. The distance between the two cities is $57.5 \mathrm{~km}$.