Answer
We use Eq. $8-31$ to obtain $\Delta E_{\mathrm{th}}=f_{k} d=(10 \mathrm{N})(5.0 \mathrm{m})=50 \mathrm{J},$ and $\mathrm{Eq} .7-8$ to get
$$
W=F d=(2.0 \mathrm{N})(5.0 \mathrm{m})=10 \mathrm{J}
$$
Similarly, Eq. $8-31$ gives
$$
\begin{aligned} W &=\Delta K+\Delta U+\Delta E_{\mathrm{th}} \\ 10 &=35+\Delta U+50 \end{aligned}
$$
which yields $\Delta U=-75 \mathrm{J} .$ By Eq. $8-1,$ then, the work done by gravity is $$W=-\Delta U=75 \mathrm{J}$$
Work Step by Step
We use Eq. $8-31$ to obtain $\Delta E_{\mathrm{th}}=f_{k} d=(10 \mathrm{N})(5.0 \mathrm{m})=50 \mathrm{J},$ and $\mathrm{Eq} .7-8$ to get
$$
W=F d=(2.0 \mathrm{N})(5.0 \mathrm{m})=10 \mathrm{J}
$$
Similarly, Eq. $8-31$ gives
$$
\begin{aligned} W &=\Delta K+\Delta U+\Delta E_{\mathrm{th}} \\ 10 &=35+\Delta U+50 \end{aligned}
$$
which yields $\Delta U=-75 \mathrm{J} .$ By Eq. $8-1,$ then, the work done by gravity is $$W=-\Delta U=75 \mathrm{J}$$