3. Two trains leave from two cities at the same time. The first one travels at 40 km/h, while the second one travels at 48 km/h. How far apart will these trains be from each other after 8 hours, if they are moving in the same direction and the distance between the cities is 892 km?
3. The trains are moving in the same direction, so they can move in the direction of $A B$ or $B A$. Let's consider each of these cases.

The trains are moving in the direction of $A B$.

1) $40 \times 8=320$ km - the first train traveled;
2) $48 \times 8=384$ km - the second train traveled;
3) $384-320=64$ km - by this much the distance between them increased
4) $892+64=956$ km - the distance between the trains.

The trains are moving in the direction of $B A$.

1) $40 \times 8=320$ km - the first train traveled;
2) $48 \times 8=384$ km - the second train traveled;
3) $384-320=64$ km - by this much the distance between them decreased
4) $892-64=828$ km - the distance between the trains.

Instead of the first three steps, we could have performed two: $48-40=8$ km - by this much the distance between the trains increased (decreased) in one hour. Multiplying by 8, we find out by how much the distance between the trains increased (decreased) in eight hours: $8 \times 8=64$ km.

Answer: the distance between the trains is 956 km or 828 km.