Suppose $R$ is a UFD and $f \in R[X]$ such that $\deg f > 0$ and $f$ has a root $\alpha \in R$. Show that $f = (X - \alpha) g$ for some $g \in R[X]$. (Suggestion: Write $f = a_0 + a_1 X + \dotsc + a_n X^n$, $g = b_0 + b_1 X + \dotsc + b_{n-1} X^{n-1}$ where $a_i \in R$, $b_i \in Q$ where $Q$ is the field of fractions of $R$. Expand $(X - \alpha)g$ and use that $\alpha \in R$ and $R$ is a ring to show that $b_{n-1},\dotsc,b_0 \in R$.)
This is the question I am attempting from my textbook. My initial thought was to use the division algorithm, but this does not seem to work. Can anyone tell me how to do this for a UFD?