They skipped a bunch of algebra. We can reconstruct the missing steps without too much difficulty.
First notice that we can expand the squared term so we have,
But then we can break out a summation of sums into a sum of summations, and so we have,
Now we can do some factoring out of terms to get,
And
now we use the fact that summation is linear to pull out a constant multiple (in this case negative x-bar) and we have,
Which unless I've screwed up my algebra is a valid way to get from line one to line two. The rest then follows as described in the proof, and the last step is just this backwards more or less. It's actually a really clever proof, I think.