Let distance be d.
d=vt where v is the speed and t the time.
So d=40t=48(t-2), because 1pm-11am=2 hours. The reference time for t is 1pm, so t-2 is 11am.
40t=48t-96, 8t=96 so t=12 hours. And d=40×12=48×10=480 km.
(To arrive at midday, the train’s speed would need to be 480/(t-1)=480/11 km/hr)