Subtracting gives \(g(q_1-q_2)=r_2-r_1\). If \(q_1\ne q_2\), the left side has degree at least \(\deg g\) (a field has no zero divisors), but the right side has degree less than \(\deg g\).
Given polynomials \(f\) and \(g\neq 0\) over a field \(F\), there exist a unique quotient \(q\) and a unique remainder \(r\) satisfying the equality below, with \(r\) zero or of degree less than that of \(g\).
\[f=gq+r,\qquad r=0\ \text{ or }\ \deg r<\deg g\]
More practice problems: polynomial division algorithm