The question did not mention anything the particles going back after travelling 7.5m in the positive direction, the acceleration gradually slows down after passing through O until it becomes zero at five, from that point onwards the particle is travelling in the negative direction until t = 10 ...
actually the q wont mention that the displacement is 7.5m u have to find this by calculation, ill show u what i mean, at t=5 sec the displacement is +7.5m
x=0.7t^2-0.1t^3+0.5t
when t=5, x=+7.5m
then the displacement is 0 at-->
0=0.7t^2-0.1t^3+0.5t
at t=7.65 the displacement is again 0 proving that the particle did travel +7.5m in the positive direction between 0 and 5, and then between 0 and 7.65 it again travels back to the origin a further 7.5m, the dist travelled=15m
now for the last 2.35 sec, u can find the displacement, u can integrate between 10 and 7.65 in the displacement, we get -25m, proving that the total dist is 7.5+7.5+25=40 , this should clear things up, if u need more explanation ill be happy to give it