Let $f(x), g(x) \in R[x]$ where $R$ is a domain, if the leading coefficient in $f(x)$ is a unit in $R$ then the division algorithm gives a quotient $q(x)$ and a remainder $r(x)$ after dividing $g(x)$ by $f(x)$. Prove that $q(x)$ and $r(x)$ are uniquely determined by $g(x)$ and $f(x)$.
I understand this Rotman exercise as a proof for the division algorithm for $R[x]$ where $R$, is a domain, I suppose it refers to an integer domain. But for the division algorithm for $f(x), g(x) \in R[x]$ where $R$ is a domain we don't use the fact $K$ is a field, just the fact that the leading coefficient in $f(x)$ is a unit in $R$ in the existence part. Im troubled because the hint for this exercise mention as a hint using $\operatorname{Frac}(R)$ so maybe I didn't understand what Im supposed to prove. Any help showing me what I'm supposed to prove and how to do it? Thanks