### symbolic polynomial euclidean algorithm

Hi there!

Suppose we have polynomials $f(x),g(x)$ with coefficients in $\mathbb{Q}(a,b)$
for example $f(x)=ax^2, g(x)=x^2-b.$ How can we find polynomials $f_1(x),g_2(x) \in
\mathbb{Q}(a,b)[x]$ such that $f(x)f_1(x)+g(x)g_1(x)=g.c.d.(f(x),g(x))$?

Thanks