On Earth, the acceleration of gravity is 9.8 m/s² downward.
So any object with only gravity acting on it gains 9.8 m/s of
downward speed every second.
If the rock starts out moving upward at 10 m/s, then it will
continue upward for only (10/9.8) = 1.02 second, before
it stops rising and starts falling.
Its average speed during that time is (1/2) (10 + 0) = 5 m/s .
At an average speed of 5 m/s for 1.02 sec,
the rock rises
(5 m/s) x (1.02 sec) = 5.102 meters .