A faster way is to recognise that
is an equation of simple harmonic motion.
Since
, it follows that the amplitude of motion is
A = 2 m.
The period of the motion is
, and over each complete period, the particle travels a distance of 4
A in returning to its starting position. Here there are two complete periods.
Total distance travelled is 2 x 4
A = 8
A = 8 x 2 = 16 m.