5.4. Daniil and Pasha were driving in a car along a straight road at a constant speed. While Daniil was driving, Pasha had nothing to do and was looking at the kilometer markers. Pasha noticed that exactly at noon they passed a marker with the number $X Y$ (where $X, Y$ are some digits), at $12:42$ - a marker with the number $Y X$, and at 1 PM - a marker with the number $X0Y$. At what speed were they traveling?
Solution. Method 1. In 42 minutes from 12:00 to 12:42, the car traveled no more than 100 km, and in the remaining 18 minutes, it traveled even less (in $42 / 18=7 / 3$) times. Therefore, by 13:00, the car had not reached the sign with the number 200. Then $X=1$. In this case, regardless of the number $Y$, the car traveled 90 km from 12 to 1 o'clock, and its speed is 90 km/h. It remains to show that at such a speed, the described situation is possible, that is, that the problem's condition is not contradictory. Indeed: in 42 minutes (which is $7 / 10$ of an hour), the car traveled 63 km. And with $Y=8$ (incidentally, such a $Y$ is unique), it will be exactly opposite the sign with the number $63+18=81$. In the remaining 18 minutes until 1 o'clock (which is $3 / 10$ of an hour), the car will travel another 27 km and will be opposite the sign with the number $81+2=108$.

Method 2. From the sign with the number $Y X=10 Y+X$ to the sign with the number $X Y=10 X+Y$, there are exactly $\overline{(10 Y+X)}-(10 X+Y)=9(Y-X)$ km. Similarly, between the signs with the numbers $X O Y$ and $Y X$, there are exactly $9(11 X-Y)$ km. The constant speed of the car means that the segments of the path it has traveled are proportional to the time spent overcoming them. In other words, we have the equation $\frac{9(Y-X)}{9(11 X-Y)}=\frac{42}{60-42}$. After solving the obtained proportion, we get the equality $Y=8 X$. This equality has two solutions in digits: $X=Y=0$, which is impossible because the first digit on the kilometer sign is different from zero, and $X=1$, $Y=8$, which is what happened. Then in one hour, the car traveled $108-18=90$ km. This is its speed.

Answer. 90 km/h.