Let (x+25)Km is total distance , t hr is time to reach the destination with speed s km/h
so time = distance/time
(x+25)/s = t ---------------(i)
if after 25km he increase his speed by 1/4 of original ,i.e, with 1.25s km/h , he reach his destination 40 min early , i.e 40/60 hr early,i.e, he takes (t - 40/60) hrs
25/s + x/1.25s = t - 40/60 --------(ii)
if after 15km he increase his speed by 1/4 of original ,i.e, with 1.25s km/h , he reach his destination 45 min early , i.e 45/60 hr early, i.e, he takes (t - 45/40) hrs
15/s + (x+10)/1.25s = t - 45/60 -----(iii)
subtract (iii) from (ii)
10/s -10/1.25s = 5/60
s = 24 km/h
subtract (ii) from (i)
x/s - x/1.25s = 40/60
x = 10s/3 = (10 * 24)/3
x = 80 km
Total distance = x+ 25 km = 80 +25 km = 105 Km .