I have two polynomials
$$ \def\f{x^5+2x^4+3x^3+3x^2+2x+1} \def\g{x^5+3x^4+4x^3+4x^2+2x+1} \def\s{\{r f + s g : r,s\in\mathbb Q[x]\}} \def\gcd{x^2+x+1} f=\f\\ g=\g $$
I want find a polynomial that generates $(f,g)=\s$.
The $sf + rg$ reminded me of greatest common divisors, and it reminds me of a similar proof in group theory where we deal with elements of $\mathbb Z$ instead of elements of $\mathbb Q[x]$, and show that we have a subgroup. So I found the gcd of $f$ and $g$ using the Euclidean Algorithm, yielding:
$$ \gamma=gcd(f,g)=\gcd $$
And I managed to show that $\s\subseteq (\gamma)$ where $(\gamma)=\{t\gamma : t\in\mathbb Q[x]\}$:
$$ a f + b g = \left(a\frac{f}\gamma + b\frac{g}\gamma\right)\gamma $$
But I'm stuck on going the other way around. I realized that if I could put $\gcd$ in terms of $f$ and $g$, I could solve this. So now I need to find the polynomial combination of $f$ and $g$ that results in $\gamma$:
$$ c_0f + c_1g = \gcd\\\\ c_0(\f) + c_1(\g) =\gcd\\ =c_0x^5 + 2c_0 x^4 + 3c_0x^3 + 3c_0x^2 + 2c_0x + c_0 + c_1x^5 + 3c_1x^4 + 4c_1x^3 + 4c_1x^2 + 2c_1x + c_1\\ =(c_0+c_1)x^4 + (2c_0+3c_1)x^4 + (3c_1+4c_1)x^3 + (3c_0+4c_1)x^2 + (2c_0+2c_1)x + (c_0+c_1) $$
I don't know how to treat the $c_i$s as polynomials, so I'll pretend they're rational numbers. So I now have the system of equations:
$$ \begin{cases} c_0+c_1=0\\ 2c_0+3c_1=0\\ 3c_0+4c_1=0\\ 3c_0+4c_1=1\\ 2c_0+2c_1=1\\ c_0+c_1=1\\ \end{cases} $$
Which can't be solved because $c_0 + c_1$ can't be both $0$ and $1$.
How can I solve this?
The problem is that $c_0$ and $c_1$ can be poynomials, not just rational numbers. So, from $$(c_0+c_1)x^5 + (2c_0+3c_1)x^4 + (3c_1+4c_1)x^3 + (3c_0+4c_1)x^2 + (2c_0+2c_1)x + (c_0+c_1)=x^2+x+1\text{,}$$ you can not obtain the system of equations you obtain, which is only valid if you assume that $c_0$ and $c_1$ are constant polynomials.
Also notice that $\exists x,y \quad xf + yg=gcd(f,g)$ by Bézout's Lemma. You don't need to know the exact value of $x$ and $y$.