If Ellen is 300m behind Dan when Dan reached the mid-point, then she would be 600m behind Dan when Dan reached the finish line since their speeds are constant.
Given that Ellen took another 5 mins to complete the 600m, her speed is
600 / 5 = 120 m/min
Time taken for her to complete the entire route -> 35 + 35 + 5 = 75 mins
Distance of the route -> 120 × 75 = 9000 m