Limit of composite function I know that $$\lim_{x \rightarrow a} (fg(x)) = f\left(\lim_{x \rightarrow a} g(x)\right)$$
provided that $\lim_{x \rightarrow a} g(x)$ exists and $f$ is continuous at this limit point. 
Normally when we say that a limit exists, we don't refer to it being infinity. So I am wondering if this applies when $\lim_{x \rightarrow a} g(x) = \infty$
It would seem so, because when I evaluate $$\lim_{x \rightarrow \infty} \tan(\sinh x) = \lim_{x \rightarrow \infty} \tan(x)$$ since $\lim_{x \rightarrow \infty} \sinh x = \infty$ . Even though, we don't evaluate $\tan$ at $\infty$, it is still that same idea... 
So I have two questions: is what I wrote above correct for that specific example? Can someone write out the conditions clearly for the case where $\lim_{x \rightarrow a} g(x) = \infty$ (I haven't been able to find it online)
Thanks

It is correct for this specific example and for functions in general. It follows from the $\varepsilon,\delta$ definition:

Theorem: If $f,g:\mathbb{R}\rightarrow\mathbb{R}$ (other domains may also work) be functions such that $$\lim_{x\rightarrow\infty} g(x)=\infty$$ then $$\lim_{x\rightarrow\infty} f(x) = \lim_{x\rightarrow\infty} f\circ g(x)$$ provided that $\lim_{x\rightarrow\infty} f(x)$ exists (it also works if the limit is infinity).

Let me provide the key point of the proof (for simplicity I'll assume that $\lim_{x\rightarrow\infty} f(x) = L<\infty$ I will leave the case where the limit is infinity as an exercise).
Proof: Let $\varepsilon>0$, since $\lim_{x\rightarrow\infty} f(x)=L$ there exists $R_f\in\mathbb{R}$ such that for every $x>R_f$ we have $|f(x)-L|<\varepsilon$.
For this $R_f$, since $\lim_{x\rightarrow\infty} g(x)=\infty$ there exists $R_g$ such that for every $x>R_g$ we have $g(x)>R_f$
Hence, for $x>R_g$ we have that $g(x)>R_f$ and so $|f(g(x))-L|<\varepsilon$. Hence $f\circ g (x)\rightarrow L$ as $x\rightarrow\infty$ which completes the proof.
