Let $g(x)$ be a polynomial of degree $d$ and $h(x)$ be a polynomial of degree $l$ over field $F$. If $\deg(\gcd(g,h)) > 0$ then there exist two polynomials $a(x)$, $b(x)$ of degrees $< l,d$ respectively such that $a(x)g(x) + b(x)h(x) = 0 $ and conversely.
By using extended Euclidean we can say that if $\deg(\gcd(g,h)) > 0$ then there exist two polynomials $a(x)$, $b(x)$ of degrees $< l,d$ respectively such that $a(x)g(x) + b(x)h(x) = \gcd(g,h)$. I am not getting how it is $0$. And the second thing is how to prove the second direction.
Reference : http://www.math.rutgers.edu/~sk1233/courses/ANT-F14/lec10.pdf (4th Page)