Let the total distance = x km.
First half is covered with a speed of 50 km/h.
∴ Time taken to cover first half of the distance (t1) = \(\frac{\frac{x}{2}}{50}= \frac{x}{100} \,km\)
Second half is covered with a speed of 40 km/h .
∴ Time taken to cover second half of the distance (t2) = \(\frac{\frac{x}{2}}{40} = \frac{x}{80} \,km\)
Total time =t1+ t2 = \(\frac{x}{100} \,+\,\frac{x}{80}= \frac{9x}{400}\)
Average speed of the car = \(\frac{Total\, distance}{Time}= \)