Let $r$ be a positive rational number, represented as the quotient of two positive integers, $r=m/n$. We will show that two definitions of $a^r$, where $a\ge0$ are equivalent: $a^r=\sqrt[n]{a^m}$, and $a^r=(\sqrt[n]{a})^m$. Furthermore, we shall show that either definition is independent of the representation of $r$ as the quotient of positive integers.
PART $(1)$:
Let $y\ge 0$ be defined
$$y=\sqrt[n]{a^m}=(a^m)^{1/n}\tag1$$
By definition of the $n$'th root, we have from $(1)$
$$y^n=a^m\tag2$$
Now, let $y=z^m$ for some number $z\ge 0$. Then, substituting into $(2)$ reveals
$$(z^m)^n=a^m\tag3$$
Using $(z^m)^n=(z^n)^m$ in $(3)$, we find that $z^n=a$, which implies that
$$y=(a^{1/n})^m\tag4$$
Equating $(1)$ and $(4)$ yields
$$(a^m)^{1/n}=(a^{1/n})^m$$
So, the two definitions of $a^r$, $(a^m)^{1/n}$ and $(a^{1/n})^m$ that are equivalent. That is to say, that
$$\bbox[5px,border:2px solid #C0A000]{\sqrt[n]{a^m}=(\sqrt[n]{a})^m}\tag5$$
PART $(2)$:
Now, we shall show that the definitions of $a^r=a^{m/n}$ in $(5)$ are independent of the representation of $r$.
Suppose $\ell$ is an arbitrary integer. Then, $a^r=a^{m/n}=a^{(\ell m)/(\ell n)}$. We wish to show that
$$a^r=\sqrt[\ell n]{a^{\ell m}}=\sqrt[ n]{a^{ m}}$$
We let $w$ be defined as
$$w=(a^{\ell m})^{1/(\ell n)}\tag6$$
so that $a^{\ell m}=w^{\ell n}$, which implies $a^m=w^n$, from which we have
$$w=(a^m)^{1/n}$$
And similarly, we wish to show that
$$(\sqrt[\ell n]{a})^{\ell m}=(\sqrt[n]{a})^{ m}$$
Let $v= (\sqrt[\ell n]{a})^{\ell m}$. But from $(5)$ we have
$$v=\sqrt[\ell n]{a^{\ell m}}$$
which we just showed was equal to $\sqrt[n]{a^m}$. Therefore, we have proven the independence of the representation of $r$ as the quotient of positive integers.