Sum of a Sum of a Squared Difference 
How did the author jump from the second equation to the third equation? I suspect there’s a rule I’m forgetting that allows for this, any help is appreciated.

A simpler way,
using 
$a^2-b^2 = (a-b)(a+b)
$,
is
$\begin{array}\\
\sum_{i=1}^{160} (x_i - 8)^2 - \sum_{i=1}^{160} (x_i - 7)^2)
&=\sum_{i=1}^{160} ((x_i - 8)^2 -(x_i - 7)^2)\\
&=\sum_{i=1}^{160} ((x_i - 8) -(x_i - 7))((x_i - 8) +(x_i - 7))\\
&=\sum_{i=1}^{160} (-1)(2x_i -15)\\
&=160\cdot 15-2\sum_{i=1}^{160} x_i\\
\end{array}
$
