For particle 1
x1 = a.sin(wt) ...(1)
For particle 2
x2 = a.sin(wt+y) ...(2)
For instance, x1=x2=a/2
From (1)
a/2 = a.sin(wt)
Solving we get,
wt=π/6 or wt=5π/6
Putting these value in (2),
sin(π/6) = a.sin(5π/6+y) = a/2
Solving this,
y=-2π/3
Phase difference between 2 particles is -2π/3. Negative sign indicates particles moving in opposite side.