The rocket's altitude
at time
is

so that after
, it will have traveled

The angle of elevation
at time
is such that

At the moment when
, this angle is

Differentiating both sides of the equation above gives

and substituting the angle
found above, and
, we get

