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