Concept:
Using work–energy theorem:
\[
W_g + W_{res} = \Delta K
\]
where
\[
W_g = mgh
\]
\[
\Delta K = \frac{1}{2}mv^2
\]
Step 1: Write work–energy equation.}
\[
mgh + W_{res} = \frac{1}{2}mv^2
\]
Step 2: Solve for work done by resistance.}
\[
W_{res} = \frac{1}{2}mv^2 - mgh
\]
Step 3: Substitute given values.}
\[
m = 1\,g = 10^{-3}\,kg
\]
\[
h = 1\,km = 1000\,m
\]
\[
v = 5\,m/s
\]
\[
W_{res} = 10^{-3}\left(\frac{25}{2} - 10^4\right)
\]
\[
|W_{res}| = 987.5 \times 10^{-3} J
\]
Thus
\[
x = 987.5
\]
Final Result
\[
x = 987.5
\]