\(x_1=A \sin \left(\omega t+\phi_1\right) \text {...1 }\)
Equation of motion of particle 2,
\(x_2=A \sin \left(\omega t+\phi_2\right) \text {...2 }\)
From (1) and (2)
\(x_2-x_1=A \sin \left(\omega t+\phi_2\right)-A \sin \left(\omega t+\phi_1\right)\)
\(=A\left[\sin \left(\omega t+\phi_2\right)-\sin \left(\omega t+\phi_1\right)\right]\)
Using, \(\sin C-\sin D=2 \cos \left(\frac{C+D}{2}\right) \cdot \sin \left(\frac{C-D}{2}\right)\)
\(x_2-x_1=2 A \cos \left(\omega t+\frac{\phi_1+\phi_2}{2}\right) \cdot \sin \left(\frac{\phi_2-\phi_1}{2}\right)\)
Given that, \(\left(x_0+x_2-x_1\right)_{\max }=x_0+A\)
\(\Rightarrow\left(x_2-x_1\right)_{\max }=A\)
\(\text { To get }\left(x_2-x_1\right)_{\max } \text {, we }\)
\(\Rightarrow 2 A \sin \left(\frac{\phi_2-\phi_1}{2}\right)=A\)
\(\Rightarrow \sin \left(\frac{\phi_2-\phi_1}{2}\right)=\frac{1}{2} \)
\(\Rightarrow \frac{\phi_2-\phi_1}{2}=\frac{\pi}{6} \text { or } \frac{5 \pi}{6}\)
\(\Rightarrow \phi_2-\phi_1=\frac{\pi}{3} \text { or } \frac{5 \pi}{3}\)
\(\text { To get }\left(x_2-x_1\right)_{\max } \text {, we assume } \cos \left(\omega t+\frac{\phi_1+\phi_2}{2}\right)=1\)