The child wants to throw the ball as high as the top of a 20 m tall tree. When the ball is thrown upwards there is a force due to the gravitational force of attraction between the Earth and the ball results in it being accelerated in a direction vertically downwards. This reduces the speed of the ball; and when it is equal to 0 the height achieved by the ball is its maximum height.
Use the formula v^2 - u^2 = 2*a*s where v is the final velocity, u is the initial velocity, a is the acceleration of the object and s is the distance traveled while the velocity changes from u to v.
In the problem, u = 20, v = 0 and a = -9.8
=> 0 - 20^2 = 2*(-9.8)*s
=> `s = 400/19.6 ~~20.40` m
The child is successful in throwing the ball to a height equal to that of the top of the tree.