`x^2+2x+1-y^2+2y-1`
`=(x^2+2x+1)-(y^2-2y+1)`
`=(x+1)^2-(y-1)^2`
`=(x+1+y-1)(x+1-y+1)`
`=(x+y)(x-y+2)`
Ta có: \(x^2+2x+1-y^2+2y-1\)
\(=\left(x+1\right)^2-\left(y-1\right)^2\)
\(=\left(x+1-y+1\right)\left(x+1+y-1\right)\)
\(=\left(x-y+2\right)\left(x+y\right)\)