Explanation:
Let
= distance traveled while accelerating
= distance traveled while decelerating
The distance traveled while accelerating is given by



We need the velocity of the rocket after 30 seconds and we can calculate it as follows:

This will be the initial velocity when start calculating for the distance it traveled while decelerating.


Solving for
we get


Therefore, the total distance x is


Assuming the ball follows classical 2D projectile motion (moves in a parabola) and that the height y = the maximum height the ball goes in the y direction (because this would be its midpoint), then the velocity at height y is equal to the initial x component of velocity. At the midpoint, the y component is zero, so the velocity only depends on the x component. Projectiles move at constant speed in the x direction, so X = Xo. As long as you know actual values for Vi and either the initial angle or one initial component, then you can solve for Xo using trigonometry. Xo is thus the velocity of the ball once it has reached its maximum height.