Let $f,g \in \mathbb{Z}[X]$ be monic polynomials such that $\deg f > \deg g$ and $g$ is irreducible in $\mathbb{Z}[X]$. If there is $a \in \mathbb{C}$ such that $f(a)=g(a)=0,$ prove that $g \mid f$ in $\mathbb{Z}[X].$
Since $g$ is irreducible in $\mathbb{Z}[X],$ it is also irreducible in $\mathbb{Q}[X],$ so $(f,g)=1$ or $(f,g)=g$ in $\mathbb{Q}[X].$
If $(f,g)=1,$ since there are $u,v \in \mathbb{Q}[X]$ such that $uf+vg = (f,g)=1,$ we would get $$0=u(a)f(a)+v(a)g(a)=1$$ which is absurd. Hence $(f,g) = g$ in $\mathbb{Q}[X] \Rightarrow g \mid f$ in $\mathbb{Q}[X].$
How can I extend the divisibility to $\mathbb{Z}[X]$? I have huge problems when dealing with $\mathbb{Z}[X],$ since $\mathbb{Z}$ is not a field, only a ring. Therefore properties like $uf+vg=(f,g)$ or $f=gc+r$ are not valid.
The moment I see $\mathbb{Z}[X]$ I panic and don't know how to approach problems like this one, especially when it comes to divisibility in $\mathbb{Z}[X].$ What are the properties from $\mathbb{F}[X]$, where $\mathbb{F}$ is a field, that work in $\mathbb{Z}[X]$ as well?