In $\mathbb Z[x]$, $x$ and $2$ have gcd $1$. But they cannot be expressed as the linear combination of two polynomials.
Then assuming that $1=2f(x)+xg(x)$ we are supposed to arrive at a contradiction. If $g\equiv 0$ then $2f(x)=1$, but there is no such $f(x)$ that is multiplicative inverse of $2$ in $\mathbb Z[x]$. Is that correct? What is the contradiction when assumed $f$ is non-zero ?
Thanks for any help.
$xg(x)$ has no constant term, so the constant term of $2f(x)+xg(x)$ is twice the constant term of $f$. But it must be equal to $1$, which is a contradiction because $1$ is not divisible by $2$.