Let $R$ be a local ring, $K=\mathrm{Frac}(R)$. Let $g(x)∈R[x]$ be polynomial whose highest coefficient is a unit.
How can I take $q(x)∈R[x]$ (not from $K[x]$) which satisfies the following
For all $f(x)∈R[x]$ and $G(x)∈R[x]$, there exists $q(x)∈R[x]$ such that $f(x)=G(x)q(x) +P(x)$ such that $\deg P(x)<\deg G(x)$.
We can take $q(x)∈K[x]$ because $K[x]$ is euclidean, but how can we take from $R[x]$ ?
Background: This is from Neukirch 'Algebraic number theory', p.130. I don't know how to take 7th line from the bottom, I don't understand why $q(x)∈O[x]$. So I asked this question.