Answer
$2.55\;\rm km$
Work Step by Step
To find the distance traveled by the locomotive, we need to find its acceleration.
When the engine and brakes of the locomotive suddenly stopped, the locomotive slows down due to the rolling friction between the rail and the wheels of the locomotive.
The net force exerted on the locomotive vertically is zero,
$$\sum F_y=F_n-\overbrace{F_G}^{=mg}=0$$
Thus,
$$F_n=mg\tag 1$$
The net force exerted on the locomotive horizontally is
$$\sum F_x=-\overbrace{F_r}^{\mu_r F_n}=ma_x$$
Thus,
$$a_x=\dfrac{-\mu_r F_n}{m}$$
Plugging from (1);
$$a_x=\dfrac{-\mu_r mg}{m}$$
$$a_x=-\mu_r g\tag 2 $$
The distance is given by
$$v_{fx}^2=v_{ix}^2+2a_x\Delta x$$
Hence,
$$\Delta x=\dfrac{\overbrace{v_{fx}^2}^{0}-v_{ix}^2}{2a_x}=\dfrac{ -v_{ix}^2}{2a_x}$$
when it stops, the final velocity became zero.
Plugging from (2);
$$\Delta x =\dfrac{ -v_{ix}^2}{-2\mu_r g }=\dfrac{ v_{ix}^2}{ 2\mu_r g }$$
Plugging the known; see table 6.1 (steel on steel of rolling friction).
$$\Delta x = \dfrac{ 10^2}{ 2\cdot 0.002\cdot 9.8 }=\color{red}{\bf 2551}\;\rm m=2.55\;\rm km$$