The work done cannot be determined because the force is not applied continuously but only for a moment by kicking it. If the contact of "kick" can be known as "dt" (say for 0.1 sec or so), then impulse force = change of momentum
or F x dt = m x dv; here dv = V-0 = V (since ball was at rest);
This impulse force is used to impart kinetic energy (or change in KE if it is moving) = mxVxV/2, where V was velocity at the time the contact of kick ends.
In the given problem, we have been given that it moves a distance of S (it is clear that work done will be equal to F x dS, ie the distance dS travelled by the ball when it is in contact with the "kick force") and not over the total distance S travelled by the ball. On the other hand if we lift the ball up against gravity with a constant force F (obviously F > mg, where m is the mass of the ball) over a distance S (and then the force F is removed), then work done = F x S. Part of the work done is used in changing the potential energy of the ball = mgS and the other part = FS - mgS will be converted into kinetic energy = (m x UxU/2) and the ball will continue to move upward for another height H, such that mxUxU/2 = mxgxH , as here work is done on the ball by the force of gravity.