Given,
The mass of the ball, m=8 kg
The initial velocity of the ball, u=12 m/s
The final velocity of the ball v=12 m/s
The initial kinetic energy of the ball is given by,

On substituting the known values,

Thus the initial kinetic energy is 64 J
The final kinetic energy is given by,

On substituting the known values,

Thus the final kinetic energy is 576 J
The work done on the ball is given by the change in the kinetic energy of the ball.
Therefore the work done on the ball is

Therefore the work done on the ball is 512 J