Ta có:
\(x+y+x^2y+xy^2=24\)
\(x+y+xy\left(x+y\right)=24\)
\(\left(x+y\right)\left(1+xy\right)=24\)
Vì \(x+y=5\) nên
\(5\left(1+xy\right)=24\)
\(\Rightarrow1+xy=\dfrac{24}{5}=4,8\)
Khi đó \(x^3+y^3=\left(x+y\right)^3-3xy\left(x+y\right)=5^3-3\times4,8\times5\)
Suy ra \(x^3+y^3=125-72=53\)