\(=\dfrac{x^2}{x\left(x-4\right)}-\dfrac{6}{3\left(x-2\right)}+\dfrac{1}{x+2}\)
\(=\dfrac{x}{x-4}-\dfrac{2}{x-2}+\dfrac{1}{x+2}\)
\(=\dfrac{x}{x-4}+\dfrac{-2x-4+x-2}{\left(x-2\right)\left(x+2\right)}\)
\(=\dfrac{x}{x-4}+\dfrac{-x-6}{\left(x-2\right)\left(x+2\right)}\)
\(=\dfrac{x^3-4x-\left(x+6\right)\left(x-4\right)}{\left(x-4\right)\left(x-2\right)\left(x+2\right)}\)
\(=\dfrac{x^3-4x-x^2+4x-6x+24}{\left(x-4\right)\left(x-2\right)\left(x+2\right)}\)
\(=\dfrac{x^3-x^2-6x+24}{\left(x-4\right)\left(x-2\right)\left(x+2\right)}\)