Let $A, B, C$ be points in a line on this order, with $A B=B C$. A car travels from $A$ to $B$ at 40 kilometers per hour and then from $B$ to $C$ at 60 kilometers per hour, without stopping in between. What is the overall speed of the trip from $A$ to $C$ ?
Let $d=A B=B C$. Then the total time taking is $\frac{d}{40}+\frac{d}{60}$, and the total distance is $2 d$. Hence the overall speed is

$$
\frac{2 d}{\frac{d}{40}+\frac{d}{60}}=\frac{2}{\frac{1}{40}+\frac{1}{60}}=48
$$