\(\left(x+1\right)^2-4\left(x+1\right)y^2+4y^4\\ =\left(x+1\right)^2-2\cdot\left(x+1\right)^2\cdot2y^2+\left(2y^2\right)^2\\ =\left[\left(x+1\right)-2y^2\right]^2\\ =\left(x-2y^2+1\right)^2\)
\(\left(x+1\right)^2-4\left(x+1\right)y^2+4y^4\)
\(=\left(x+1\right)^2-2\left(x+1\right)2y^2+\left(2y\right)^2\)
\(=\left(x+1-2y^2\right)^2\)