This is an old, yet interesting question.
Our position equation as our car moves forward is
• x = at2 + v0t
Our velocity equation then would be
• v = 2at
This problem has 3 parts: when the car is speeding up (a=5m/s2), when the car is slowing down(a=-8m/s2), and when the car is cruising at 60km/hr (a=0).
First, let's focus on when our car is accelerating forward (a = 5m/s2)
Convert km/hr to m/s
60 km/hr * 1000 m/km * 1hr/3600≅ 16.67 m/s
Plug this velocity into our equation and solve for t,
16.67 m/s = 2*t*5m/s
--> t = 1.67s speeding up
we see that our car reaches the speed limit in about 1.67s. If we plug that same time into our x equation (v0=0), we see the car has only travelled 13.9m while speeding up.
Because we can't accelerate anymore legally, we must continue to cruise until we apply the brakes. If the car accelerated forward at the same rate as it did backward, we could use symmetry to say the car spent 1.67s braking, but unfortunately the car brakes at -8.0 m/s
We know the car must cruise at 16.67 m/s until the time comes to apply the brakes. We can find the time needed to stop the car going at that speed by using our velocity equation above
16.67 m/s =2* -8.0m/s * t --> t = 1.04s braking
Plugging that time into its position equation (v0=16.67)
x = (1.04s)2(-8.0m/s)+(16.67m/s)(1.04s) = 8.7m travelled braking
Now we're almost done: we have the time spent speeding up and slowing down. now we need the time cruising at 60km/h (aka 16.67m/s). If we've travelled 8.7m braking and 13.9m going forward, that means we spent 277.4 meters cruising. Plugging that into its position equation
277.4m = 0*t2 + t*16.67m/s
--> t ≅ 16.6s time spent cruising
The total time would be 16.64s+1.04s+1.67s = 19.35s, though because of sig figs (5 m/s instead of 5.0m/s) 19s would be more accurate