First, let's find the acceleration and the final velocity in the first 20 seconds, using the formula below:

During the 10 seconds with constant speed, the distance he ran is:

Now, in the last 5 seconds, the distance is:

Therefore the total distance is:
