Acceleration is the rate of change of velocity, so can be calculated by:
a = v2 - v1 / t where v2 and v1 are the final and initial velocities of the object respectively and t is the time taken. Therefore the acceleration is:
a = 30 m/s - 20 m/s / 2.0 s = 10 m/s / 2.0 s = 5 m/(s^2)
Hope this helps!