<s>[INST] Simplify the following compound fraction: $$\frac{2x+1}{\frac{3}{x^2}+\frac{2x+1}{x}}$$
My calculator says the final answer is $$\frac{x^2(2x+1)}{2x^2+x+3}$$
Please show the work. Thanks.
 [/INST] First recall that
\[ \frac{a}{b} \pm \frac{c}{d} =\frac{ad \pm cb}{bd} \]
And 
\[ \frac{a}{\left(\frac{c}{d}\right)} =\frac{ad}{c} \]
Then
\[
\frac{2x+1}{\frac{3}{x^{2}}+\frac{2x+1}{x}}= \frac{2x+1}{\frac{3x+x^{2}(2x+1)}{x^{3}}}= \frac{x^{3}(2x+1)}{3x+x^{2}(2x+1)}= \frac{x^{3}(2x+1)}{2x^{3}+x^{2}+3x}= \frac{x^{3}(2x+1)}{x(2x^{2}+x+3)}= \frac{x^{2}(2x+1)}{2x^{2}+x+3}
\]
</s>