The mechanical energy of an object is equal to the sum of its kinetic and potential energy. The mechanical energy of the rock shall conserve as it ascends as long as no external forces act on it during this process. That is:

#"KE"("initial") + "PE"("initial") =
"KE"("at vertex") + "PE"("at vertex")#

The kinetic energy of the rock is dependent on its velocity whereas the potential energy its height. The stone travels at an initial #22 color(white)(l) "m"//"s"# at the ground level where it has zero height hence no gravitational potential energy. Therefore

#"KE"("initial") = 1/2 * m * v^2("initial") = 1/2 * 0.350 color(white)(l) "kg" * (22 color(white)(l) "m" // "s")^2 #

#color(white)("KE"("initial") ) = 84.7 color(white)(l) "kg" * "m"^2 // "s"^2 = 84.7 color(white)(l) "J"#

#"PE"("initial") = m * g * h("initial") = 0#

The rock would have maximum potential energy, but a speed of zero at the point of its maximum height since all its kinetic energy has been converted to potential energy. That is:

#"KE"("at vertex") = 1/2 * m * v^2("at vertex") = 0#

#"PE"("at vertex") = "KE"("initial") + "PE"("initial") - "KE"("at vertex")#

#color(white)("PE"("at vertex")) = 84.7 color(white)(l) "kg" * "m"^2 // "s"^2 #

However

#"PE"("at vertex") = m * g * h("max")#

Thus

#h("max") = ("PE"("at vertex")) / (m * g)#

#color(white)(h("max")) = (84.7 color(white)(l) color(red)(cancel(color(black)("kg"))) * "m"^ color(red)(cancel(color(black)(2)))//color(red)(cancel(color(black)("s"^2))) ) /(0.350 color(white)(l) color(red)(cancel(color(black)("kg"))) * 9.8 color(white)(l) color(red)(cancel(color(black)("m"//"s"^(2))))#

#color(white)(h("max")) = 24.7 color(white)(l) "m"#