Basically, you realise that i) and ii) look quite similar, so you're tempted to take a "cos inverse" of i) to get some relationship of x_0 and x_0-a. However, obviously you can't do this without justification, but you can rigorise it as follows:
u have cos(A)-cos(B)=-2sin(A+B /2)sin(A-B /2), and...