@Jasmine done T=2pi/omega and we assume that w1 is greater than omega 2 then we take particle 2 at rest, let now our particle 1 moves with different angular velocity time period for complete revolution is 2pi/w1-w2 yes.
If we have a particle moving around a circle at constant angular velocity $\omega$ then the position on the $y$ axis is $y(t) = A\sin(\omega t)$ so that gives us the SHM. Yes?
@Jasmine I haven't labelled the angles because the diagram was getting messy, but if you look at the two angles $\omega_1 t$ and $\omega_2 t$ you'll see that $\omega_1 t + \omega_2 t = \pi$
@Jasmine then the second occasion they meet is when the blue particle has gone all the way round the circle and caught up with the red particle i.e. $\omega_2 t = \omega_1 t + 2\pi$.
This time the particles are moving in the same direction on the $y$ axis.
@Jasmine the $2\pi n$ equation is fine, but it gives you only the meetings when the particles are moving in the same direction i.e. when $\omega_2 t = \omega_1 t + 2\pi n$.
@JohnRennie if they had the same w and different initial phase then that will that mean they will meet only when they are going in different directions