Whole trip takes 50 minutes or 50/60 hours = 5/6 hours
Temptation is to notice 8 and 6 average to 7 km/hour so
distance equals rate of speed times time would give 7 times 5/6= 35/6
as total distance. That's close, a good approximation, but
since the 8 km/hr driving time is less than the 6 km/hr time, the 7 km/hr
approximation is weighted slightly on the higher side.
Let x = the time to drive the 8 km/hour distance, so 8x=the distance
then let 5/6-x = the time to drive the 6 km/hour trip then 6(5/6-x) is the same distance
Set them equal: 8x=6(5/6-x) and solve for x The distance is the same from either direction
that's half the distance, so double it to get the full total distance of 40/7
we originally estimated 35/6 as the total distance.
35/6 compares to 40/7 very closely
but 35/6 overestimates it slightly, as 35/6 is greater than 40/7
35/6=245/6 while 40/7 = 240/7, just 5/7 greater
The correct answer is 40/7 = about 5.71 or exactly 5 5/7 km