\(x^2-4x+4-y^2\)
\(=\left(x-2\right)^2-y^2\)
\(=\left(x-2-y\right)\left(x-2+y\right)\)
\(=\left(x-2\right)^2-y^2=\left(x-y-2\right)\left(x+y-2\right)\)
x2 - 4x - y2 + 4
= x2 - 4x + 4 - y2
= (x2 - 2.2.x + 22) - y2
= (x - 2)2 - y2
= (x - 2 - y)(x - 2 + y)