\(\left(x-3\right)\left(x^2+3x+9\right)-\left(3x-17\right)=x^3-12\)
\(\Rightarrow x\left(x^2+3x+9\right)-3\left(x^2+3x+9\right)-3x+17=x^3-12\)
\(\Rightarrow x^3+3x^2+9x-3x^2-9x-27-3x+17=x^3-12\)
\(\Rightarrow x^3+\left(3x^2-3x^2\right)+\left(9x-9x\right)-3x-10=x^3+12\)
\(\Rightarrow x^3-3x-10=x^3+12\)
\(\Rightarrow x^3-3x-10-12=x^3\)
\(\Rightarrow x^3-3x-22=x^3\)
\(\Rightarrow3x-22=0\)
\(\Rightarrow3x=22\Rightarrow x=\dfrac{22}{3}\)