Using the division algorithm, find the greatest common divisor of $x^4+x+1$ and $x^3+2$ in $\mathbb{Q}[x]$ and express it as a linear combination of these polynomials.
So far the division has given me that:
\begin{align*} x^4+x+1&=x(x^3+2)+(1-x)\\ x^3+2&=(-x^2-x-1)(1-x)+3\\ 1-x&=-\frac{1}{3}x+\frac{1}{3} \end{align*} and of course that $\gcd\left(f(x),\,g(x)\right)=1$.
I'm not entirely sure how to proceed or how to represent these as linear combinations.