I have some issues with solving this exercise:
Prove: Let $F$ be a field. If $f,g∈F[x]$ are relatively prime and not both constant, then there exists $a,b∈F[x]$ such that $af+bg=1$ and $\deg(a)<\deg(g)$, $\deg(b)<\deg(f)$.
My attempt: We know that $F[x]$ is a principal ideal domain, so the ideal $$I≔{af+bg∶a,b∈F[x]}$$ is equal to $(d)$ for some $d\in F[x]$ with minimal degree in the set. Let’s do the division of $f$ by $d$ $$f=dq+r$$ where $\deg(r)<\deg(d)$ and $r=f-dq\in I$, so $r=0$ and $d\mid f$. In the same way we get $d\mid g$. Now if $c\mid f,g$, then $c$ divides all the non-zero element of $I$ and so $d$ too. Therefore $d=\gcd(f,g)$ and $1=d=af+bg$ for some $a,b\in F[x]$.
The problem is that I'm not able to prove the fact about degrees of $a$ and $b$.
If $af+bg=1$ and $\deg a\geq\deg g$ then we can write $a=qg+r$ with $\deg r<\deg g$ and so $$1=af+bg=(a-qg)f+(b+qf)g=rf+(b+qf)g.$$ Comparing degrees shows that $\deg(b+qf)g=\deg rf$ and hence that also $\deg b+qf<\deg f$.