I assume that x-1 is a factor of k^2x^3-6kx+9. Divide x-1 into this cubic;
.......k^2x^2+k^2x+k^2-6k
x-1 | k^2x^3.............-6kx......+9
........k^2x^3-k^2x^2
....................k^2x^2-6kx
....................k^2x^2-k^2x
...............................(k^2-6k)x+9
...............................(k^2-6k)x-k^2+
...............................................9+k^2-6k
k^2-6k+9=0 if there is to be no remainder, (k-3)^2=0 and k=3.
Therefore the factors of the cubic are (x-1)(9x^2+9x-9)=9(x-1)(x^2+x-1)[=9(x^3-2x+1)].