For this, we use the conservation of energy. We know that loss of kinetic energy = gain in potential energy, so KE = PE. Our equation is 0.5mv2 = mgh, but as we have m on both sides, this cancels. So, we are left with 0.5v2 = gh, and to find h = 0.5*v2/g = 0.5 * 52 / 9.81 = 1.274... m. So, the height the ball reaches is 1.27 m (to 3 sig. fig.).