Time = distance/speed
He rides a bicycle 8 kmph , he reaches 2.5 mins late
T + 2.5/60 = D/8
T = D/8 - 2.5/60
If he increased his speed to 10kmph , he reaches 5 mins early
T - 5/60 = D/10
T = D/10 + 5/60
D/8 - 2.5/60 = D/10 + 5/60
2D/80 = 7.5/60
D = 5km