31m/s is the velocity of the object and in 6 seconds the object stops so its velocity is then 0 m/s.
acceleration formula is a = Δv / Δt = (vf - vi)/(tf - ti)
=(final velocity - initial velocity)/(final time - intial time)
kinda like the slope formula right?
so subsitute the values
(0 - 31)/(6 - 0)
The answer should be negative as the velocity is decreasing