Lets divide the qstn into 2 parts..
(1) the distance it travelled in the frst 8 sec
(2) the distance it travld inte next 4 secs..that is in total 12 sec.
using the eqn s=ut+1/2 at2,
s=160m..................this s d distnce travelled in 8 sec.
now while considering the 2nd part the final velocity in the frst becomes the initial in the sec.
find the final velocity. v=u+at..(not sure abt dis eqn....sry.)
u get v=40m/s.
in the secnd prt it is said that the body moves with uniform velocity. ie a=0
using the eqn s=ut+1/2at2,
u get s=(40*4)+0
thrfore the total distance travelled equals 160+160