Taking the upward direction to be positive, the cannonball's height
in the air at time
is given by
where
is the magnitude of the acceleration due to gravity, 10 m/s^2, and
is the height of the building from which the ball is being thrown.
At the moment the cannonball reaches its maximum height of 30 m, its velocity at that time is 0, so that
Substitute this into the height equation above, and let
, for which we have
:
Solve for
: (units omitted for brevity; we know that
should be given in m)