let us consider the motion of ball from the point 25 m above the ground.
The ball takes 4 seconds to return back at that point, since
TIME OF FLIGHT=2u/g, so putting g=10 and time of flight =4 seconds , we get u=20m/s, it means at 25m above the ground, velocity of ball is 20m/s.
Now considering the motion of particle between the ground and the point 25m above the ground.
g=10 and u=?
so use third equation of motion,
v^2-u^2=2as, u will get the answer
Hope this helps
If you still don't understand i will explain it in detail