Application of laws of limits Could someone explain me how the author applied the limit and then took the power. According to limit Laws, it is valid when the exponent is any positive integer but here it is a function of $x$ and $x$ is approaching towards infinity, so why did the author apply it here.

1.10.6. Find
$$
\lim _{x \rightarrow \infty}\left(1+\frac{1}{x^{2}}\right)^{x}
$$
Solution $\lim _{x \rightarrow \infty}\left(1+\frac{1}{x^{2}}\right)^{x}=\lim _{x \rightarrow \infty}\left[\left(1+\frac{1}{x^{2}}\right)^{x^{2}}\right]^{1 / x}=e^{0}=1$

Book - I.A. Maron Problems in Calculus of One Variable.
 A: Before evaluating a limit and algebra done is valid regardless of the value that it will take, and it is true that:
$$f(x)^{x}=\left(f(x)^{x^2}\right)^{1/x}$$
What is happening after that is they are using the fact that:
$$\lim_{x\to\infty}\left(1+\frac 1{x^2}\right)^{x^2}=e$$
then:
$$e^{1/x}\to 1$$
A: From your photo, it appears the author of your book gives no explanation of the steps made, so I won't guess at what I.A. Maron had in mind. But I see you are anxious to justify the result, so I will try to give a more rigorous answer.
I define $g(x)\,=\,(1+\frac{1}{x^2})^{x^2},\,\,$ and $f(x)\,=\,\frac{1}{x}.\,\,$
We wish to show:$\,\,\,\,g(x)^{f(x)}\,\to\,1,\,\,\,\,$ as $x \to +\infty.$
For us $g(x)>1$,   since $x$ big and positive.
Note that $x \mapsto \log x$ is continuous.
$$g(x)^{f(x)}\,\,=\,\,e^{f(x)\log{g(x)}},$$
$${f(x)\log{g(x)}}\,\,\to\,\,(0)(\log e)\,\,=\,\,0.$$
Finally, noting $x \mapsto e^x$ is continuous,
$$g(x)^{f(x)}\,\,=\,\,e^{f(x)\log{g(x)}}\,\,\to\,\,e^{(0)(\log e)}\,\,=1.$$
