\(x^2y+xy^2+x+y=2018\)
\(\Leftrightarrow xy\left(x+y\right)+\left(x+y\right)=2018\)
\(\Leftrightarrow\left(xy+1\right)\left(x+y\right)=2018\Leftrightarrow12\left(x+y\right)=2018\)
\(\Leftrightarrow x+y=\frac{1009}{6}\)
\(x^2+y^2=\left(x+y\right)^2-2xy=\left(\frac{1009}{6}\right)^2-2.11=...\)