There's nothing wrong with that calculation. But remember that the gcd (or hcf) of two polynomials is usually defined as themonicpolynomial of highest degree that divides both of them. Your answer 2 is not monic because the highest degree term (the constant term!) has coefficient 2.

To get the right answer, divide it by 2. (!)