Acceleration is the rate of change of velocity, so we subtract the final velocity from the initial velocity and divide it by the time taken for the change. In this case the acceleration is (40-20)/5 = 4ms^-2. This means that each second, the velocity of the particle is increasing by 4ms^-1