According to the question, a and b points are such that they are
located at same distances from the equilibrium position.
Here also it is said that velocity is same
,i.e; not only the magnitude but also the directions are same.
So, total time period of oscillation =2×( time taken to go from a to b
+ the next time taken to return at b) =2×(2+2)=8 sec.