The equations of motion to use for a constant acceleration a = g = -9.81:
[tex]v = gt + v_0[/tex]
[tex]y = \frac{1}{2} g t^{2} + v_0t + y_0[/tex]
at the highest point the velocity must be zero:
[tex]0 = gt + v_0 \\ v_0 = -gt[/tex]
combine both equations:
[tex]y = \frac{1}{2} \frac{v_0^{2} }{g} - \frac{v_0^{2} }{g} + y_0= -\frac{1}{2} \frac{v_0^{2} }{g} + y_0[/tex]
Solve for v₀:
[tex]v_0 = \sqrt{2g(y_0 - y)} [/tex]