<s>[INST] Calculate the limit of $(1+x2^x)/(1+x3^x)$ to the power $1/x^2$ when $x\to 0$ I have a problem with this: $\displaystyle \lim_{x \rightarrow 0}{\left(\frac{1+x2^x}{1+x3^x}\right)^\frac{1}{x^2}}$. 
I have tried to modify it like this: $\displaystyle\lim_{x\rightarrow 0}{e^{\frac{1}{x^2}\ln{\frac{1+x2^x}{1+x3^x}}}}$ and then calculate the limit of the exponent: $\displaystyle \lim_{x\rightarrow 0}{\frac{1}{x^2}\ln{\frac{1+x2^x}{1+x3^x}}}$. 
But I don't know what to do next. Any ideas?
 [/INST] Since
$$
2^x=1+\log(2)x+O\!\left(x^2\right)\\
\Downarrow\\
\log\left(1+x2^x\right)=x+\left(\log(2)-\tfrac12\right)x^2+O\!\left(x^3\right)
$$
and
$$
3^x=1+\log(3)x+O\!\left(x^2\right)\\
\Downarrow\\
\log\left(1+x3^x\right)=x+\left(\log(3)-\tfrac12\right)x^2+O\!\left(x^3\right)
$$
Therefore,
$$
\frac1{x^2}\log\left(\frac{1+x2^x}{1+x3^x}\right)=\log\left(\frac23\right)+O\!\left(x\right)
$$
Applying $e^x$ gives
$$
\left(\frac{1+x2^x}{1+x3^x}\right)^{1/x^2}=\frac23\left(1+O(x)\right)
$$
</s>