Example 5 Given real numbers $x, y$ satisfy $x+y=3, \frac{1}{x+y^{2}}+\frac{1}{x^{2}+y}=\frac{1}{2}$.
Find the value of $x^{5}+y^{5}$. [3]
(2017, National Junior High School Mathematics League)
From the given equation, we have
$$
\begin{array}{l}
2 x^{2}+2 y+2 x+2 y^{2}=x^{3}+x y+x^{2} y^{2}+y^{3} \\
\Rightarrow 2(x+y)^{2}-4 x y+2(x+y) \\
\quad=(x+y)\left((x+y)^{2}-3 x y\right)+x y+x^{2} y^{2} .
\end{array}
$$

Substituting $x+y=3$ into the above equation, we get
$$
\begin{array}{l}
(x y)^{2}-4 x y+3=0 \\
\Rightarrow x y=1 \text { or } x y=3 \text { (discard). } \\
\text { Also, } x^{5}+y^{5}=\left(x^{2}+y^{2}\right)\left(x^{3}+y^{3}\right)-x^{2} y^{2}(x+y), \\
x^{3}+y^{3}=(x+y)\left((x+y)^{2}-3 x y\right)=18, \\
x^{2}+y^{2}=(x+y)^{2}-2 x y=7,
\end{array}
$$

Therefore, $x^{5}+y^{5}=123$.