I assume they just subbed back in (x +/- root(x^2 - 4))/2 into the original equation and manipulated it using index laws/general algebra. You gotta be careful of the plusminus sign though but it should be alright? no tricks involved
the other way to do it would be to start from:
a+b+c = -3, ab+bc+ac = 0, abc = -2 and use Viete's formulae (Im not sure what they're called in school? 'product and sum of roots' or something?)
Youd get (a+1/a) + (b+1/b) + (c+1/c) = (a+b+c) + (1/a + 1/b + 1/c) = -3 + (ab+bc+ac)/abc = -3, so the x^2 term is 3.
(a+1/a)(b+1/b) + (a+1/a)(c+1/c) + (b+1/b)(c+1/c) = (ab+bc+ac) + (a/b + b/a + b/c + c/b + a/c + c/a) + (1/ab + 1/bc + 1/ac),
but (ab+bc+ac) = 0, and (a/b + b/a + b/c + c/b + a/c + c/a) = (a+b+c)(1/a + 1/b + 1/c) - 3 = (-3)(ab+ac+bc)/abc - 3 = (-3)(zero) - 3 = -3 and (1/ab + 1/bc + 1/ac) = (a+b+c)/abc = 3/2
So the x term is -3 + 3/2 = -3/2
And (a+1/a)(b+1/b)(c+1/c) = abc + 1/abc + ab/c + bc/a + ac/b + a/bc + b/ac + c/ab.
abc = -2, 1/abc = -1/2. Then ab/c + bc/a + ac/b = (ab+bc+ac)(1/a+1/b+1/c) - 2(a+b+c) = (-3)(zero, we've found 1/a +1/b+1/c before) - 2(-3) = 6. And also a/bc + b/ac + c/ab = (a+b+c)(1/ab + 1/bc + 1/ac) - (a/b + b/a + b/c + c/b + a/c + c/a) = (-3)(3/2, found this before) - (-3, found this before) = 3 - 9/2 = -3/2.
So the constant term is -(-2 -1/2 + 6 - 3/2) =- 2.
This gives an answer of x^3 + 3x - 3/2 x - 2 = 0, I have no idea whether thats right though coz this method could easily mess up the arithmetic. But this method will almost always work with enough algebraic manipulation; from the three original polynomial root/coefficient equations you can derive almost any symmetric expression in a,b,c; including the root/coefficient equations for the polynomial you want to form.