Using the formula:
a = (Vf - Vi) / t
The object is coming to a stop, so the initial velocity will be 30 m/s and the final velocity will be 0 m/s. The time is 5s, as stated in the problem.
a = (0 - 30) / 5
a = -6 m/s^2
(Also, the negative sign is important because it shows a deceleration)