Polynomial/Bezout/X^2-1 and X^3-1/Exercise

Determine the greatest common divisor of and , and a representation of it.