$\displaystyle f(X)=X^4+X^3+2X+2$ and $\displaystyle g(X)=X^3+X^2+X+1$.

$\displaystyle f(X)$ and $\displaystyle g(X)$ are both polynomials over $\displaystyle \mathbb{Z}_5$. Compute their greatest common divisor.

My notes aren't helping me here; never done an example like this before, so a detailed explanation of the method would be greatly appreciated :)