So, we have the formules a^3 + b^3 = (a + b)^3 - 3ab(a + b) and a^2 + b^2 = (a + b)^2 - 2ab;
Then, x^2 + 1/x^2 = (x + 1/x)^2 - 2x(1/x); 7 = (x + 1/x)^2 - 2; (x + 1/x)^2 = 9;
There are 2 situations:
i) x + 1/x = 3; then, x^3 + 1/x^3 = (x + 1/x)^3 - 3x(1/x)(x + 1/x);
x^3 + 1/x^3 = 3^3 - 3·1·3 = 27 - 9 = 18;
ii) x + 1/x = -3; in the same way as i), x^3 + 1/x^3 = (-3)^3 - 3·1·(-3) = -27 + 9 = -18.