Here is the proof of AM-GM based on rearrangement inequality following the hints given in Steele J.M. The Cauchy-Schwarz master class (MAA CUP 2004), Exercise 5.7, page 84. (And the same proof can be certainly found in many other places.)
We first show that:
For any $c_1,\dots,c_n>0$ we have
$$n\le \frac{c_1}{c_n}+\frac{c_2}{c_1}+\frac{c_3}{c_2}+\dots+\frac{c_n}{c_{n-1}}. \tag{1}$$
Indeed, if the permutation which reorders these $n$ numbers in the increasing order is $\sigma \colon \{1,2,\dots,n\}\to\{1,2,\dots,n\}$ then we have
\begin{gather*}
c_{\sigma(1)} \le c_{\sigma(2)} \le \dots \le c_{\sigma(n-1)} \le c_{\sigma(n)}\\
\frac1{c_{\sigma(n)}} \le \frac1{c_{\sigma(n-1)}} \le \dots \le \frac1{c_{\sigma(2)}} \le \frac1{c_{\sigma(1)}}
\end{gather*}
and the rearrangement inequality gives us
$$c_1\cdot \frac1{c_n} + c_2\cdot\frac1{c_1} + \dots + c_n \frac1{c_{n-1}} \ge c_{\sigma(1)}\cdot\frac1{c_{\sigma(1)}}+c_{\sigma(2)}\cdot\frac1{c_{\sigma(2)}}+\dots+c_{\sigma(n)}\cdot\frac1{c_{\sigma(n)}}=n.$$
Simply by using $(1)$ for $c_n=x_1, c_2=x_1x_2, c_3=x_1x_2x_3, \dots, c_n=x_1x_2\cdots x_n$ we get:
For any $x_1,x_2,\dots,x_n>0$ we have
$$n\le \frac{x_1}{x_1x_2\dots x_n}+x_2+x_3+\dots+x_n. \tag{2}$$
Making one more substitution, namely replacing $x_i$ by $ax_i$, we get that
For any $x_1,x_2,\dots,x_n>0$ and $a>0$ we have
$$n\le \frac{ax_1}{a^nx_1x_2\dots x_n}+ax_2+ax_3+\dots+ax_n. \tag{3}$$
Now if we choose $a$ in $(3)$ in such way that $a^nx_1x_2\dots x_n=1$, i.e., $a=\dfrac1{\sqrt[n]{x_1x_2\dots x_n}}$, then the above equality becomes
\begin{align*}
n &\le a(x_1+x_2+\dots+x_n)\\
\frac1a &\le \frac{x_1+x_2+\dots+x_n}n\\
\sqrt[n]{x_1x_2\dots x_n} &\le \frac{x_1+x_2+\dots+x_n}n
\end{align*}
So we get that AM-GM is true for any positive real numbers $x_1,x_2,\dots,x_n$.