College Algebra Test (Live Questions as I study) Basic, first chapter review.

Just have a big review coming up soon and am studying, will be posting questions as I run into problems. All the help that can be given is greatly appreciated, math is one of my worst subjects and I catch on very slowly. First question is this

I have worked with the midpoint formula and the distance formula in chapter one, but I don't understand this part.

how do they get the (1+2y+y^2) out of (-1-y)^2?? Shouldnt that simplify to 1+y^2? I know i'm wrong, just need to know why. The other parts of the section are easy, but squaring variables and stuff confuses me.

Just have a big review coming up soon and am studying, will be posting questions as I run into problems. All the help that can be given is greatly appreciated, math is one of my worst subjects and I catch on very slowly. First question is this

I have worked with the midpoint formula and the distance formula in chapter one, but I don't understand this part.

how do they get the (1+2y+y^2) out of (-1-y)^2?? Shouldnt that simplify to 1+y^2? I know i'm wrong, just need to know why. The other parts of the section are easy, but squaring variables and stuff confuses me.