\(x^3-y^3=\left(x-y\right)^3+3xy\left(x-y\right)\)
=>\(5^3+3\cdot xy\cdot5=335\)
=>\(15xy=335-125=210\)
=>xy=14
x-y=5
=>x=y+5
xy=14
=>\(y\left(y+5\right)=14\)
=>\(y^2+5y-14=0\)
=>(y+7)(y-2)=0
=>\(\left[{}\begin{matrix}y=-7\\y=2\end{matrix}\right.\)
Khi y=-7 thì x=y+5=-7+5=-2
Khi y=2 thì x=y+5=2+5=7