The acceleration is
Acceleration is the ratio of the change in velocity of an object to the time required to produce that change:
In this problem, the change in speed was an increase from 20 m/s to 40 m/s - a change of 20 m/s.
It took from 15 s until 60 s to bring about this change, so 45 s elapsed.
Therefore the acceleration is the value of the ratio