Answer
$y^2+2y+1= (y+1)^2$
Work Step by Step
We add the square of half of the coefficent of $y$ so that the result is a perfect square trinomial.
Co-efficient of $y=2$
Half of 2 is $\frac{1}{2}×2=1$
Square of 1 is $1×1=1$
We add 1 to $y^2+2y$ to make it a perfect square trinomial.
Hence it becomes $y^2+2y+1$
Factored form-
$y^2+2y+1$
$=y^2+1y+1y+1$
$=y(y+1)+1(y+1)$ (Taking the common factors)
$=(y+1)(y+1)$ ($ y+1$ is taken common from both the terms)
$=(y+1)^2$