\(5x^2y-20xy^2+20y^3=5y\left(x^2-4xy+4y^2\right)=5y\left(x-2y\right)^2\)
\(x^2+6x+9-y^2=\left(x+3\right)^2-y^2=\left(x+3-y\right)\left(x+3+y\right)\)
\(a)5x^2y-20xy^2+20y^3=5xy(x-4y+4y^2)\)
\(b)x^2-y^2+6x+9=(x+y)(x-y)+3(2x+3)\)
a. \(5x^2y-20xy^2+20y^3=5y\left(x^2-xy+y^2\right)=5y\left(x-y\right)^2\)
b. \(x^2-y^2+6x+9=\left(x^2+6x+9\right)-y^2=\left(x^2+2\cdot x\cdot3+3^2\right)-y^2\)
\(=\left(x+3\right)^2-y^2=\left(x+3-y\right)\left(x+3+y\right)\)