Both results shown are correct; the use of PolynomialGCD is not quite what was intended. In particular, PolynomialGCD does not take a variable as an argument because a polynomial gcd is a multivariate entity. The extended gcd relies on having a single variable, with everything else being in a coefficient field (typically the rationals or integers modulo a prime, but could instead be a function field).
a = x^3 + x^2 + 4 x + 4;
b = 3 x^4 + x^2 + 1;
d = PolynomialGCD[a, b, Modulus -> 5]
(* Out[3]= 4 + x^2 *)