<s>[INST] Having problems finding $x$ in terms of $a$ and $b$. I have attempted this question but have not found a solution. I am currently stuck. Hints on how I may go further would be helpful. Thank You in advance.
The Question:
$$\frac{a^2b}{x^2} + \left(1+\frac{b}{x}\right)a = 2b+ \frac{a^2}{x}$$
What I have done so far that I believe is correct:
$$\frac{a^2b}{x^2} + \frac{ab}{x} + a = 2b+ \frac{a^2}{x}$$
If you would like to see other work that I have attempted on this question I can also place it up. 
 [/INST] Bring $a\left(1+\frac{b}{x}\right)+\frac{a^2b}{x^2}$ together using the common denominator $x^2$. Bring $2b+\frac{a^2}{x}$ together using the common denominator $x$:
$$
\frac{a^2b+abx+ax^2}{x^2}=\frac{a^2+2bx}{x}.
$$
Now cross multiply:
$$
x(a^2b+abx+ax^2)=x^2(a^2+2bx).
$$
Then expand out the terms of the left- and right-hand sides:
$$
a^2bx+abx^2+ax^3=a^2x^2+2bx^3.
$$
Now subtract $a^2x^2+2bx^3$ from both sides to get
$$
a^2bx-a^2x^2+abx^2+ax^3-2bx^3=0.
$$
Collect everything in terms of $x$:
$$
a^2bx+x^2(ab-a^2)+x^3(a-2b)=0.
$$
Now notice that the left-hand side factors into a product with three terms:
$$
x(a-x)(ab-ax+2bx)=0.
$$
Split this into three equations:
$$
a-x=0\quad\text{or}\quad x=0\quad\text{or}\quad ab-ax+2bx=0.
$$
Simple manipulations to these three equations shows that
$$
x=a\quad\text{or}\quad x=0\quad\text{or}\quad x=-\frac{ab}{2b-a}.
$$
By the original expression, we know that $x\neq 0$; thus, the final answer is
$$
x=a\quad\text{or}\quad x=-\frac{ab}{2b-a}.
$$
</s>