a: \(x^2-6xy+9y^2=x^2-2\cdot x\cdot3y+\left(3y\right)^2=\left(x-3y\right)^2\)
b: \(x^2-9y^2\)
\(=x^2-\left(3y\right)^2\)
=(x-3y)(x+3y)
c: \(x^2y^2-4xy+4\)
\(=\left(xy\right)^2-2\cdot xy\cdot2+2^2\)
\(=\left(xy-2\right)^2\)
d: \(y^2-\left(x^2-2x+1\right)\)
\(=y^2-\left(x-1\right)^2\)
=(y-x+1)(y+x-1)
a) \(x^2-6xy+9y^2=x^2-2\cdot x\cdot3y+\left(3y\right)^2=\left(x-3y\right)^2\)
b) \(x^2-9y^2=x^2-\left(3y\right)^2=\left(x-3y\right)\left(x+3y\right)\)
c) \(x^2y^2-4xy+4=\left(xy\right)^2-2\cdot xy\cdot2+2^2=\left(xy-2\right)^2\)
d) \(y^2-\left(x^2-2x+1\right)=y^2-\left(x-1\right)^2=\left(y-x+1\right)\left(y+x-1\right)\)

