My question is what happened to the yellow part of the equation, why does it disappear in the new line. I understand that if you take the square root of $x^2$ then it should be $x,$ but in the second line of equation we only have the sum of $xy$ with square-root of $n-1.$ Please provide a dummy explanation. Also if you have time, please explain the red part of the equation?
Please be aware there is a picture attached. Please click on "What happened to $x^2$".