Simplified form of $\left(6-\frac{2}{x}\right)\div\left(9-\frac{1}{x^2}\right)$. Tried this one a couple of times but can't seem to figure it out.
I am trying to simplify the expression:
$$\left(6-\frac{2}{x}\right)\div\left(9-\frac{1}{x^2}\right)$$
So my attempt at this is:
$$=\bigg(\dfrac{6x}{x}-\dfrac{2}{x}\bigg)\div\bigg(\dfrac{9x^2}{x^2}-\dfrac{1}{x^2}\bigg)$$
$$=\bigg(\dfrac{6x-2}{x}\bigg)\div\bigg(\dfrac{9x^2-1}{x^2}\bigg)$$
$$=\dfrac{6x-2}{x}\cdot\dfrac{x^2}{9x^2-1}$$
$$=\dfrac{(6x-2)(x^2)}{(x)(9x^2-1)}$$
$$=\dfrac{6x^3-2x^2}{9x^3-x}$$
This is the part that I get stuck at. I can't decide what to factor out:
$$=\dfrac{x(6x^3-2x^2)}{x(9x^3-x)}$$
$$=\dfrac{(6x^2-2x)}{(9x^2-1)}$$
Edit, missed a difference of squares:
$$=\dfrac{2x^2(6x^3-2x^2)}{x(9x^3-x)}$$
$$=\dfrac{2x^2(3x-1)}{x(3x-1)(3x+1)}$$
Giving a final answer of:
$$=\boxed{\dfrac{2x}{3x+1}}$$

$$\dfrac{(6x^3-2x^2)}{x(9x^3-x)} = \dfrac{2x^2(3x - 1)}{x(9x^2 - 1)} $$
Cancel common factor of $x$ in numerator and denominator gives us:
$$\dfrac{2x^2(3x - 1)}{x(9x^2 - 1)} = \frac{2x(3x-1)}{\left[9x^2 - 1\right]}$$
Now we have a difference of squares in the denominator, and can factor it:
$$\frac{2x(3x-1)}{\color{blue}{\bf \left[9x^2 - 1\right]}}= \frac{2x(3x-1)}{\color{blue}{\bf \left[(3x)^2 - 1\right]}} = \frac{2x(3x - 1)}{(3x - 1)(3x + 1)}$$
Now, cancel like terms: Note that  $\color{blue}{(3x - 1)}$ is a factor in the numerator and in the denominator, so we proceed to cancel:
$$ \frac{2x\color{blue}{\bf (3x - 1)}}{\color{blue}{\bf(3x - 1)}(3x + 1)} = \frac{ 2x}{3x + 1}$$
