Example 8 Solve the equation
$$
\frac{13 x-x^{2}}{x+1}\left(x+\frac{13-x}{x+1}\right)=42 \text {. }
$$
(9th Zu Chongzhi Cup Mathematics Invitational Competition)
Let $y=\frac{13-x}{x+1}$, then $x+y=\frac{13+x^{2}}{x+1}$, $x y=\frac{13 x-x^{2}}{x+1}$. Thus, the original equation can be transformed into the system of equations
$$
\left\{\begin{array}{l}
x y(x+y)=42, \\
x y+(x+y)=13 .
\end{array}\right.
$$

Let $x+y=u, x y=v$, then the above system of equations becomes
$$
\left\{\begin{array}{l}
u+v=13, \\
u v=42 .
\end{array}\right.
$$

Solving this, we get $\left\{\begin{array}{l}u=7, \\ v=6\end{array}\right.$ or $\left\{\begin{array}{l}u=6, \\ v=7 .\end{array}\right.$
That is, $\left\{\begin{array}{l}x+y=7, \\ x y=6\end{array}\right.$ or $\left\{\begin{array}{l}x+y=6, \\ x y=7 .\end{array}\right.$
Solving these two systems of equations, we find that the solutions to the original equation are
$$
x_{1}=1, x_{2}=6, x_{3}=3+\sqrt{2}, x_{4}=3-\sqrt{2} \text {. }
$$