First, let's calculate the distance travelled during acceleration. The equation of motion is:
\[
v^2 = u^2 + 2a s
\]
Where:
- \(v\) is the final velocity,
- \(u\) is the initial velocity,
- \(a\) is the acceleration,
- \(s\) is the distance.
For the first part of the motion, the body starts from rest, so \(u = 0\), and the acceleration \(a = 2 \, \text{m/s}^2\). Let \(s_1\) be the distance travelled during acceleration. Using the equation of motion:
\[
v^2 = 0 + 2 \times 2 \times s_1
\]
\[
v^2 = 4 s_1
\]
For the second part, the body comes to rest, so the final velocity \(v = 0\) and the retardation \(a = -2 \, \text{m/s}^2\). Let \(s_2\) be the distance travelled during retardation. Using the equation of motion:
\[
0 = v^2 - 2 \times 2 \times s_2
\]
\[
v^2 = 4 s_2
\]
Since the velocity is the same for both parts of the motion, we have:
\[
4 s_1 = 4 s_2 \quad \Rightarrow \quad s_1 = s_2
\]
Thus, the total distance travelled is:
\[
s_{\text{total}} = s_1 + s_2 = 2 s_1
\]
Substituting the values:
\[
s_1 = 15 \, \text{m} \quad \Rightarrow \quad s_{\text{total}} = 30 \, \text{m}
\]
Thus, the total distance travelled is 30 meters.