$A$ and $B$ run a 5000-meter race. In the first attempt, $A$ gives $B$ a 1 km head start and finishes 1 minute earlier. In the second attempt, $A$ gives an 8-minute head start and is still 1 km away from the finish line when $B$ reaches the finish. How many minutes does it take for $A$ and how many for $B$ to complete the 5000-meter race? (We assume that the average speed of the runners does not change between the two races.)
I. solution: $x$ minutes for A. $B$ takes $y$ minutes for $1 \mathrm{~km}$.

In the first trial, A runs $5 \mathrm{~km}$ in $5 x$ minutes, while B runs $4 \mathrm{~km}$ in 1 minute longer, so

$$
5 x+1=4 y
$$

In the second trial, B runs $5 \mathrm{~km}$ in $5 y$ minutes, while A runs $4 \mathrm{~km}$ in 8 minutes less, so

$$
5 y-8=4 x
$$

or equivalently

$4 x+8=5 y$.

Subtracting (1) from (2)

$$
y=7-x
$$

Substituting this value of $y$ into (1)

$$
5 x+1=28-4 x
$$

from which

$$
x=3 \quad \text { and } \quad \text { thus } \quad y=7-x=4 \text {. }
$$

Therefore, the $5000 \mathrm{~m}$ distance is run by A in 15 minutes and by B in 20 minutes.

II. solution: A runs $5 \mathrm{~km}$ in $x$ minutes, so $1 \mathrm{~km}$ in $\frac{x}{5}$ minutes.

In the first trial, B runs $4 \mathrm{~km}$ in $(x+1)$ minutes, so $1 \mathrm{~km}$ in $\frac{x+1}{4}$ minutes.

In the second trial, B runs $5 \mathrm{~km}$ in $\frac{5(x+1)}{4}$ minutes, while A runs $4 \mathrm{~km}$ in $\frac{4 x}{5}$ minutes, and according to the problem

$$
\frac{5(x+1)}{4}=\frac{4 x}{5}+8
$$

from which $x=15$ minutes. B's time for 5 km is then $\frac{5(x+1)}{4}=20$ minutes.

III. solution: In the two races, both runners together cover $9 \mathrm{~km}$, but A runs for 9 minutes less.

So A runs $1 \mathrm{~km}$ in 1 minute less than B. In the first race, A gains a 4-minute lead over 4 km and since A wins by 1 minute, the first km takes 3 minutes, so B runs $1 \mathrm{~km}$ in 4 minutes. Thus, A runs $5 \mathrm{~km}$ in 15 minutes and B in 20 minutes.