I've actually found the solution to the problem but not the proof, so if someone could help me understand it that would be great.

Rewriting in the authors own terms, he starts with the equation

and ends with

Can anyone explain the inbetween steps for me?