Step-by-step 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

