Answer
30 seconds
Work Step by Step
The vehicle has an initial velocity of v0 = 0 m/s (it is at rest). It initially accelerates at $2.0m/s^2$ until it reaches a speed of 20m/s.
We use the equation
$ v = v0 +at $ to find the time it took for it to reach the 20m/s
$20 = 0 + (2m/s^2)t $ so then t = 10 s
It then slows at a constant rate of $ 1.0m/s^2$, a = -1 $m/s^2$ (since it is slowing down) and once again we solve the equation. Here, v0 = 20m/s and v = 0 (since it stops)
$ 0 = 20 + (-1.0m/s^2)t $ so then t = 20 seconds
Adding the two together we get that t = 10 + 20 = 30 seconds