Basically, you can rewrite it as:
$$\lim f(x)^{h(x)}=e^{\lim \ln (f(x)) h(x)}$$ Now you just resolve the upper limit whatever way you want. It entirely depends on each case. You may have noticed that it's not necessary to split $f(x)$ into a fraction, but it may be useful. As $\lim f(x)=1$, it could indeed be helpful to use $\ln (f(x))\approx f(x)-1$, which is the expression you got.