\(x^3+6x^2+9x-xy^2\)
\(=x\left(x^2+6x+9-y^2\right)\)
\(=x\left[\left(x+3\right)^2-y^2\right]\)
\(=x\left(x+3-y\right)\left(x+3+y\right)\)
\(x^3+6x^2+9x-xy^2\)
\(=x\left(x^2+6x+9-y^2\right)\)
\(=x\left[\left(x^2+6x+9\right)-y^2\right]\)
\(=x\left[\left(x+3\right)^2-y^2\right]\)
\(=x\left(x+3+y\right)\left(x+3-y\right)\)