a)\(=\left(x^2-4x+4\right)-y^2=\left(x-2\right)^2-y^2=\left(x-2-y\right)\left(x-2+y\right)=\left(x-y-2\right)\left(x+y-2\right)\)
b) \(=\left(x^2+2xy+y^2\right)-\left(2x+2y\right)=\left(x+y\right)^2-2\left(x+y\right)=\left(x+y\right)\left(x+y-2\right)\)
a) $x^2-4x+4-y^2$
$=x^2-2.x.2+2^2-y^2$
$=(x-2)^2-y^2$
$=(x-2-y)(x-2+y)$
b) $x^2 + 2xy + y^2 - 2x - 2y$
$=x^2+2.x.y+y^2-2x-2y$
$=(x+y)^2-(2x-2y)$
$=(x+y)^2+2(x+y)$
$=(x+y)(x+y-2)$