3. A pedestrian is walking along a path next to a steep track (in the longitudinal direction) at a speed of $6 \mathrm{~km} / \mathrm{h}$. He noticed that the train coming from the opposite direction passed him in 12.6 seconds. With the same train, while walking uphill at a speed of $3.6 \mathrm{~km} / \mathrm{h}$, he passed it in 15 seconds. What is the length of the train and what is its speed?
Solution. Let the speed of the train be $x \mathrm{~m} / \mathrm{sec}$, and its length be $y \mathrm{~m}$. From the conditions of the problem, we obtain the following system of equations:

$$
\left\{\begin{array}{l}
12.6 x + 6 \cdot 12.6 = y \\
15 x - 3.6 \cdot 15 = y
\end{array}\right.
$$

From which we get $x=15, y=210$. Therefore, the speed of the train is $15 \mathrm{~m} / \mathrm{sec} = 54 \mathrm{~km} / \mathrm{h}$, and its length is $210 \mathrm{~m}$.