@alisonkiddle
If it’s by time: 50mph.
If it’s by distance: t1 hours * 40 mph = t2 hours * 60 mph (so t2 = 2/3 t1)
We are looking for total distance / total time = (t1*40mi/h+t2*60mi/h)/(t1+t2)
= 2*t1*40mi/h / (5/3 t1)
= 80 mi/h * 3/5
= 48 mi/h
(I don’t know if the sign for miles is actually mi.)