(b) According to the graph the acceleration $a$ varies linearly with the coordinate $x$. We may write $a = \alpha x$, where $\alpha$ is the slope of the graph.
From the graph
$\alpha = \frac{20}{8}mg_{0} = 2.5\ s^{- 2}$
The force on the brick is in the positive $x$-direction and according to Newton’s second law, its magnitude is given by
$F = \frac{a}{m} = \frac{\alpha}{m}x$
If $x_{f}$ is the final coordinate, the work done by the force is
$W = \int_{0}^{x_{f}}{F\ dx = \frac{a}{m}\int_{0}^{x_{f}}{x\ dx}}$
$= \frac{\alpha}{2m}x_{f}^{2} = \frac{2.5}{2 \times 10} \times (8)^{2}$
$= 8\ J$