At the mountain cabin, our coach said: "If we continue at this comfortable pace of $4 \mathrm{~km}$ per hour, we will arrive at the station 45 minutes after our train has left."

Then he pointed to a group that was just passing us: "They are using poles, and thus achieve an average speed of $6 \mathrm{~km}$ per hour. They will be at the station half an hour before our train leaves."

How far was the station from the mountain cabin?

(M. Volfová)

Hint. Recall the relationships between average speed, total distance, and required time.
Let the time from the moment the coach motivated us at the mountain hut until the departure of the train be denoted by $t$ (in hours). Let the length of the route from the hut to the station be denoted by $s$ (in km).

At a comfortable pace, we would walk $\frac{s}{4}$ hours and arrive three-quarters of an hour after the train's departure; hence,

$$
\frac{s}{4}=t+\frac{3}{4}
$$

Walking with poles takes $\frac{s}{6}$ hours, which is half an hour less than $t$; hence,

$$
\frac{s}{6}=t-\frac{1}{2}
$$

From both equations, we express $t$:

$$
t=\frac{s}{4}-\frac{3}{4}, \quad t=\frac{s}{6}+\frac{1}{2}
$$

Thus, we obtain a new equation:

$$
\frac{s}{4}-\frac{3}{4}=\frac{s}{6}+\frac{1}{2}
$$

By manipulating this equation, we obtain the length of the route $s$:

$$
\begin{aligned}
3 s-9 & =2 s+6 \\
s & =15
\end{aligned}
$$

The route from the hut to the station was $15 \text{ km}$ long.

Note. The result can also be obtained as follows. From the first two equations above, we express $s$:

$$
s=4 t+3, \quad s=6 t-3
$$

Thus, we obtain a new equation:

$$
4 t+3=6 t-3
$$

From which we easily express $t=3$. By substituting back, we obtain

$$
s=12+3=18-3=15.
$$