Let us assume Leo starts from a point (0,0)
Since the total length of the race is 5 km, he will be at (5,0) at the end of the race.
It is given that, he is at the mid point of the race.
Mid point formula is : [tex]\frac{(x_{1} +x_{2} )}{2} , \frac{(y_{1} +y_{2} )}{2}[/tex]
Present coordinate : [tex]\frac{5+0}{2} , \frac{0+0}{2} = (2.5,0)[/tex]
He still needs to run 5-2.5 = 2.5 km