We got different answers. There is an easier way to factor the second one.

Hint: x^2+2x+1 = (x+1)^2