Total energy of the particle, E=1J
Force constant, k=0.5N/m
Kinetic energy of the particle,
K=(1/2)mv2
According to the conservation law:E=V+K1=(1/2)kx2+(1/2)mv2
At the moment of turn back, velocity (and hence K) becomes zero.
1=(1/2)kx2
(1/2)0.5x2=1
x=2
Hence, the particle turns back when it reaches x=2m.