3. Given that $x$ and $y$ are positive integers, and $xy + x + y$ $=23, x^2y + xy^2=120$. Then $x^2 + y^2=$ $\qquad$
3.34 .

Let $x+y=s, xy=t$. Then $s+t=23, st=120$. We get $s=8, t=15$ or $s=15, t=8$ (discard). $x^{2}+y^{2}=(x+y)^{2}-2xy=s^{2}-2t=34$.