How to factor $(1+\frac{1}{x})(-\frac{6}{x^2})+(\frac{6}{x^3})(1+\frac{1}{x})^2$ to get $\frac{6}{x^3}(1+\frac{1}{x})(1+\frac{2}{x})$? 
How can I factor this: $$\left(1+\frac{1}{x}\right)\left(-\frac{6}{x^2}\right)+\left(\frac{6}{x^3}\right)\left(1+\frac{1}{x}\right)^2$$
in order to get this result: $$\frac{6}{x^3}\left(1+\frac{1}{x}\right)\left(1+\frac{2}{x}\right)$$

I have tried to factor out the $(1+\frac{1}{x})$ use the distributive property, and failed multiple times. Every online calculator I tried gives me different results.
 A: Eqn 1
$$(1+\frac{1}{x})(-\frac{6}{x^2})+(\frac{6}{x^3})(1+\frac{1}{x})^2$$
$$(-\frac{6}{x^2})+(-\frac{6}{x^3})+(\frac{6}{x^3})(1+\frac{1}{x^2}+\frac{2}{x})$$
$$(-\frac{6}{x^2})+ (-\frac{6}{x^3}) + \frac{6}{x^3}+\frac{6}{x^5}+\frac{12}{x^4}$$
$$\frac6{x^2}[\frac{1}{x^3}+\frac{2}{x^2}-1]$$
Eqn 2
$$\frac{6}{x^3}(1+\frac{1}{x})(1+\frac{2}{x})$$
$$(\frac{6}{x^3}+\frac{6}{x^4})(1+\frac2{x})$$
$$\frac6{x^3}[1+\frac3{x} +\frac2{x^2}]$$
On comparision we know that both the equations are different and there is is no way to convert Eqn 1 to Eqn 2.
A: My first thought was to factor out the $\frac 6{x^2}$ but yours was to factor out the $1 + \frac 1x$.  So we'll do it your way:
Factor out the $1 + \frac 1x$ and we get
$(1 + \frac 1x) (\frac {-6}{x^2} + \frac 6{x^3}(1 + \frac 1x))$.
Now factor out the $\frac 6{x^2}$ to get:
$\frac 6{x^2}(1 + \frac 1x) (-1 + \frac 1x(1 + \frac 1x))$
$\frac 6{x^2}(1 + \frac 1x)(-1 + \frac 1x + \frac 1{x^2})$
now, I can struggle with trying to factor $(-1+\frac 1x + \frac 1{x^2})$[1] but I must point out that if you claimed factorization and my demonstrated factorization were both true we'd have $-1 + \frac 1x + \frac 1{x^2} = \frac 1x(1+\frac 2x)$.  WHich it doesn't.
Are you sure the question wasn't to solve for  the $x$ where it does factor to that?  In which case we'd solve for $-1 + \frac 1x + \frac 1{x^2} = \frac 1x(1+\frac 2x)$ or $-1 = \frac 1{x^2}$ which is $x =\pm i$ if we are allowed to use complex numbers...  So... I guess that wasn't the question.
[1] Long story short; by the rational roots theorem we can't.
A: Hint 
$$-\frac{6}{x^2}\left(1+\frac{1}{x}\right)+\frac{6}{x^3}\left(1+\frac{1}{x}\right)^2=\frac{6}{x^2}\left(1+\frac 1x\right)\left(\frac 1x+\frac 1{x^2}-1\right).$$
