A driver went $200$ km. For the first $100$ km of the trip, the driver traveled at a speed of $40$ km/h. For the second half of the trip, the driver traveled at a speed of $60$ km/h. What was the driver’s average speed for the entire trip?
I used the average speed formula which is $\text{speed}_\text{average} = \dfrac{\text{total distance}}{\text{total time}}$
& got $\dfrac{200}{\dfrac{100}{40}+\dfrac{100}{60}}$
which resulted into an average speed of $48$ km/h.
My problem is the way I solved the problem, our topic is rational equations & I don't know how to make it like that with a variable. Does anyone have a clue on how to make a rational equation out of this?