cubercalebbtaylor2401Since subtraction is anticommutative I don't think that you can make that jump. But I am not entirely sure.
= sum((x*x - 2*x*u + u*u)) / n
= (sum(x*x) - sum(2*x*u) + sum(u*u)) / n
-2xu = -1*2xu
It's just pulling out a constant multiplier, which comes out in front of a summation. (Because ab+ac = a(b+c)). This is the same rule that lets me pull out the 2u on line 4.