Example 2 The system of equations $\left\{\begin{array}{l}x+y+xy=19, \\ x^{2}+y^{2}=25\end{array}\right.$ has the solution
(First Songliao Cup Junior High School Mathematics Competition)
Solution: Let $x+y=u, xy=v$, the original system of equations can be transformed into
$$
\left\{\begin{array}{l}
u+v=19 \\
u^{2}-2 v=25 .
\end{array}\right.
$$
(1) $\times 2+$ (2) gives $u^{2}-2 u-63=0$.

Solving, we get $u=-9$ or $u=7$. Substituting into (1), we get $v=28$ or $v=12$.
Therefore, the original system of equations can be transformed into
( I ) $\left\{\begin{array}{l}x+y=-9, \\ x y=28\end{array}\right.$ or ( II ) $\left\{\begin{array}{l}x+y=7, \\ x y=12 .\end{array}\right.$
( I ) has no real solutions. Solving (II) gives