Example 9 Find the rational solutions of the equation $x^{x+y}=(x+y)^{y}$.

Translate the above text into English, please keep the original text's line breaks and format, and output the translation result directly.
【Analysis】If $x=0$, then $x^{x+y}=0,(x+y)^{y}=0$. Therefore, $y=0$, but $0^{0}$ is undefined, so $x \neq 0$.
If $y=0$, then $x^{x}=1$, which implies $x=1$.
Clearly, $x=1, y=0$ is a rational solution.
Hereafter, we assume $x \neq 0, y \neq 0$.
Let $y=x z$. Then the original equation is equivalent to
$$
\begin{array}{l}
x^{x(1+z)}=[x(1+z)]^{x} \\
\Leftrightarrow x^{1+z}=x^{z}(1+z)^{x} \Leftrightarrow x=(1+z)^{x} .
\end{array}
$$

Assume $x$ and $z$ are the irreducible fractions $\frac{m}{n}$ and $\frac{p}{q}$ ($n, q \in \mathbf{Z}_{+}$).
Substituting into equation (1) yields
$$
\left(\frac{m}{n}\right)^{q}=\frac{(p+q)^{p}}{q^{p}} \Rightarrow q^{p} m^{q}=n^{q}(p+q)^{p} \text {. }
$$

When $p>0$, $q^{p} \mid n^{q}(p+q)^{p}$.
Since $(p, q)=1$, we have $(q, p+q)=1$.
Therefore, $q^{p}\left|n^{q}, n^{q}\right| q^{p} m^{q}$.
Since $(m, n)=1$, we have $n^{q} \mid q^{p}$.
Thus, $q^{p}=n^{q}$.
If $q$ is a positive integer greater than 1, let the prime factorization of $q$ be
$$
q^{p}=p_{1}^{\alpha, p} p_{2}^{\alpha, \nu} \cdots p_{k}^{a \nu}=n^{q} .
$$

Therefore, $q \mid \alpha_{i} p$, i.e., $q \mid \alpha_{i}(i=1,2, \cdots, k)$.

Using mathematical induction, it is easy to prove:
For positive integers $q>1$, $2^{q}>q$.
Thus, $Q^{q} \geqslant 2^{q}>q$, which is a contradiction.
Hence, $q=1$, and consequently, $n=1$.
Similarly, when $p<0$, $(p+q)^{-p} m^{q}=n^{q} q^{-p}$, we can deduce $q^{-p}=|m|^{q}$.
Therefore, $q=1,|m|=1$.
In summary, the rational solutions to the original equation are
$$
x=(1+z)^{2}, y=z(1+z)^{2},
$$

where $z \neq-1$ is an integer.