(b) Between time interval 20s the 4s, there is non-zero acceleration and retardation. Hence, distance travelled during this interval = Area between time interval 20 s to 40 s
$\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ = \frac{1}{2} \times 20 \times 3 + 20 \times 1 = 30 + 20 = 50\ m$