Ta có : \(x+y=3\Rightarrow\left(x+y\right)^2=3^2=9\)
\(=x^2+2xy+y^2=9\)
\(\Rightarrow x^2+y^2+2.2=9\)
\(\Rightarrow x^2+y^2+4=9\)
\(\Rightarrow x^2+y^2=5\)
Ta có : \(x^3+y^3=\left(x+y\right)\left(x^2-xy+y^2\right)\)
\(=3\left(x^2+y^2-2\right)\)
\(=3\left(5-2\right)=3.3=9\)