PolynomialExtendedGCD
PolynomialExtendedGCD[poly1,poly2,x] gives the extended GCD of poly1 and poly2 treated as univariate polynomials in x.
PolynomialExtendedGCD[poly1,poly2,x,Modulus->p] gives the extended GCD over the integers modulo the prime p.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.