x + y = 10
x^3 + y^3 = 162 + x^2 + y^2
x^3 + y^3 factors into (x+y)(x^2+xy+y^2)
we know x+y is 10 from the first equation so we plug that in
so now we have:
10(x^2+xy+y^2) = 162+x^2+y^2
expanding gives us
10x^2+10xy+10y^2 = 162+x^2+y^2
combine like terms
9x^2 + 9y^2 + 10xy - 162 = 0
divdie both sides by 9
x^2 + y^2 + 9/10xy - 18 = 0
Since x+y = 10, (x+y)^2 = 100 and x^2+y^2 = 100 - 2xy
plugging that in gives
100-2xy+9/10xy-18=0
combine like terms
82-11/10xy=0
11/10xy = 82
xy = 820/11
now knowing the sum and product of x and y, we can create quadratic satisfying these properties using vieta's and solve
x+y = -b/a
xy = c/a
let a = 1 for convenience
we get
n^2 -10n + 820/11 = 0
solving gives
x and y = 5 + i(sqrt(545/11)) and 5 - i(sqrt(545/11))