If $\displaystyle\lim_{x\to \infty} \left(1+\frac{a}{x}+\frac{b}{x^2}\right)^{2x} = e^2$, find $a,b\in \mathbb{R}$
I tried this by converting the expression given inside the brackets (denote by $f(x)$) into $e^\left({\displaystyle\lim_{x\to \infty}{2x}{\ln(f(x))}}\right)$ and then evaluating the power with $2$. But I didn't really get the correct solution.
I found a solution here but I couldn't understand how they did. I feel that they were along the same lines as I except that either of us did something wrong.
Note that we have
$$\left(1+\frac{a}{x}+\frac{b}{x^2}\right)^{2x}=\left[\left(1+\frac{ax+b}{x^2}\right)^{\frac{x^2}{ax+b}}\right]^\frac{2ax^2+2xb}{x^2}\to e^{2}$$
when $a=1$ for every $b$.