I am interested in whether the sequence $a_n = \left(1 + \frac{1}{n+2}\right)^{3n\log n}$ converges or diverges.
Am I allowed to say: $$\lim_{n \rightarrow \infty}a_n = \lim_{n \rightarrow \infty}\left(\lim_{m \rightarrow \infty}\left(1 + \frac{1}{m+2}\right)^{3m}\right)^{\log n}$$
$$ = \lim_{n \rightarrow \infty}e^{3\log n} = \infty$$
I am not sure how legitimate it is to split the limit in this fashion, since even though exponentiation is continuous, the exponentiation depends on $n$.
It is not legitimate to compute a limit in this fashion. Compare, if you will, the following computation:
$$1 = \lim_{n \to \infty} 1 = \lim_{n \to \infty} \frac n n = \lim_{n \to \infty} n \left(\lim_{m \to \infty} \frac 1 m\right) = \lim_{n \to \infty} n \cdot 0 = 0$$
which is clearly wrong.
However, there is a seed of a correct idea here. A consequence of the limit that you used inside the parentheses is that once $n$ is large enough,
$$\left(1 + \frac 1 {n + 2}\right)^{3n} > 2$$
which is enough to imply that
$$\left(1 + \frac 1 {n + 2}\right)^{3n \log n} > 2^{\log n}$$ and your sequence is unbounded.