\(9x^6-12x^7+4x^8\)
\(=9x^6-6x^7-6x^7+4x^8\)
\(=3x^6\left(3-2x\right)-2x^7\left(3-2x\right)\)
\(=3x^6\left(3-2x\right)-2x^7\left(3-2x\right)\)
\(=\left(3-2x\right)\left(3x^6-2x^7\right)\)
\(=x^6\left(3-2x\right)\left(3-2x\right)=x^6.\left(3-2x\right)^2\)