A boy throws a 0.2kg rock up with a speed of 5m/s. If all the kinetic energy becomes gravitational potential energy, how high will the stone go?

The relation between kinetic and potential energy
The potential energy is the energy accumulated in an object by its location.
PE = mgh where, m - mass, g - acceleration due to gravity and h - height
The energy possessed by an object as a result of its motion is known as kinetic energy.
KE KE = \frac{1}{2} mv^2 Where, m-mass and v- velocity
Energy cannot be destroyed, only converted from one form to another, according to the law of conservation of energy.
PE begins from 0 at the projection point and increases to a maximum value at a constant speed at maximum height.
KE begins at the projection point with a maximum value and decrease constantly to 0 at maximum height.
Total energy = PE + KE.
At the maximum height (when object dropped): PE = KE
Step 1: Set up an equation for the height
Given that
Mass of rock m = 0.2 kg
Speed of the stone v = 5 m/s
Acceleration due to gravity a = 9.8 m/s^2
Kinetic energy = Potential energy
PE = PE .
mgh = \frac{1}{2} mv^2
h = \frac{1}{2} \frac{v^2}{g}
Step 2: determining the height reached by the stone
h = \frac{1}{2} \frac{(5 m/s)^2}{(9.8 m/s^2)}
h = \frac{25}{2*9.8} = 1.27
Hence, height reached by the stone = 1.27 m
Since the kinetic energy is equal to the potential energy at the maximum height,
mgh = \frac{1}{2} mv^{2}
h=\frac{1}{2}\left(\frac{v^2}{g}\right)
h=0.5\left(\frac{25\ \frac{m^2}{s^2}}{9.8\ \frac{m}{s^2}}\right)\approx1.27\ m
The height of the stone will be 1.27 m.