The best method of answering this question would be to look at the energy of the ball at the moment it is thrown and at the moment it reaches its highest point.
When the ball is thrown, initially all the energy is kinetic. We can calculate the ball's kinetic energy using KE = 0.5mv2 where m is the mass and v the velocity.
Using this equation we find:
KE = 0.50.5202 - the ball's mass must be in kg, hence 0.5 instead of 500
KE = 100J - remember units!
Now let's think about the ball at its highest point. At this moment, the ball will have stopped moving, and all its kinetic energy will have been converted into gravitational potential energy. This agrees with the law of conservation of energy.
Therefore the ball will have 100J of gravitational potential energy.
Using the equation for GPE, we can work out the height the ball has reached.
GPE = mgh where g is the gravitational acceleration on earth (roughly 10gms-2) and h is the height
100 = 0.510h
h = 20m