If $(x, y)$ is a solution to the system

$$
\left\{\begin{array}{l}
x y=6 \\
x^{2} y+x y^{2}+x+y=63
\end{array}\right.
$$

determine the value of $x^{2}+y^{2}$.
Solution

We have

$$
\begin{aligned}
63 & =x^{2} y+x y^{2}+x+y \\
& =x y(x+y)+(x+y) \\
& =6(x+y)+(x+y) \\
& =7(x+y)
\end{aligned}
$$

Therefore, $x+y=9$. Thus,

$$
\begin{aligned}
x^{2}+y^{2} & =(x+y)^{2}-2 x y \\
& =81-12 \\
& =69
\end{aligned}
$$