suppose
$$L=\lim_{x\rightarrow a}\mathrm{f}(x)^{\mathrm{g}(x)}\\
\lim_{x\rightarrow a}\mathrm{f}(x)=1\\
\lim_{x\rightarrow a}\mathrm{g}(x)=\infty\\
\text{clearly}\\
\mathrm{f}(x)^{\mathrm{g}(x)}=\exp\left(\mathrm{g}(x)[\mathrm{f}(x)-1]\dfrac{\log(\mathrm{f}(x))}{\mathrm{f}(x)-1}\right)\\
%\phantom{\mathrm{f}(x)^{\mathrm{g}(x)}}
\text{since exp is continuous the limit may be moved inside}\\
L=\lim_{x\rightarrow a}\mathrm{f}(x)^{\mathrm{g}(x)}\\
\phantom{L}=\lim_{x\rightarrow a}\exp\left(\mathrm{g}(x)[\mathrm{f}(x)-1]\dfrac{\log(\mathrm{f}(x))}{\mathrm{f}(x)-1}\right)\\
\phantom{L}=\exp\left(\lim_{x\rightarrow a}\, \left\{ \mathrm{g}(x)[\mathrm{f}(x)-1]\dfrac{\log(\mathrm{f}(x))}{\mathrm{f}(x)-1}\right\} \right)\\
\phantom{L}=\exp\left( \left\{ \lim_{x\rightarrow a}\, \mathrm{g}(x)[\mathrm{f}(x)-1] \right\} \left\{ \lim_{x\rightarrow a}\,\dfrac{\log(\mathrm{f}(x))}{\mathrm{f}(x)-1}\right\} \right)\\
L=\exp\left( \lim_{x\rightarrow a}\, \mathrm{g}(x)[\mathrm{f}(x)-1] \right)\\
\text{we have used the product rule for limits and the obvious fact}\\
\lim_{x\rightarrow a}\,\dfrac{\log(\mathrm{f}(x))}{\mathrm{f}(x)-1}=1
$$