Let $$ \begin{aligned} & f(x)=a_{n} x^{n}+a_{n-1} x^{n-1}+\cdots+a_{1} x+a_{0} \\ & g(x)=b_{m} x^{m}+b_{m-1} x^{m-1}+\cdots+b_{1} x+b_{0} . \end{aligned} $$
Case 1. $n<m$.
Let $Q(x)=0$ and $R(x)=f(x)$.
Then
$$
f(x)=Q(x) g(x)+R(x) \text { and } \operatorname{deg}(R)<\operatorname{deg}(g) .
$$
Case 2. $n \geqslant m$.
For any $i, n \geqslant i \geqslant m$,
$$ a_{i} x^{i}=\frac{a_{i}}{b_{m}} x^{i-m}\left(b_{m} x^{m}+b_{m-1} x^{m-1}+\cdots+b_{1} x+b_{0}\right)-\frac{a_{i}}{b_{m}} b_{m-1} x^{i-1}-\frac{a_{i}}{b_{m}} b_{m-2} x^{i-2}-\cdots-\frac{a_{i}}{b_{m}} b_{0} x^{i-m} . $$
This implies that every term $a_ix^i$ in $f$ with $i\ge deg(g)$ can be written as the product of $\frac{a_i}{b_m}x^{i-m}$ and $g$, and a subtraction of smaller degree terms. Therefore $f$ can be written in a form that is a summation of two types of terms:
- $c_ix^ig(x)$ where $c_i$ is the coefficient and $i\ge deg(g)$.
- $c_ix^i$ where $i<deg(g)$.
Therefore
$$ f(x)=\sum_{i=m}^{n} c_{i} x^{i-m}\left(b_{m} x^{m}+b_{m-1} x^{m-1}+\cdots+b_{1} x+b_{0}\right)+\sum_{i=0}^{m-1} c_{i} x^{i} . $$
Let $Q(x)=\sum_{i=m}^{n} c_{i} x^{i-m}$ and $R(x)=\sum_{i=0}^{m-1} c_{i} x^{i}$.
Then
$$
f(x)=Q(x) g(x)+R(x) \quad \text { and } \operatorname{deg}(R)<\operatorname{deg}(g) .
\;\square$$
Is the proof valid? In case 2 the idea is that any term in $f(x)$ with exponent $\ge deg(g)$ can be written as a product of a term and $g(x)$, and a subtraction of some terms with a smaller exponent. This then implies that $f(x)$ can be written as containing two types of terms:
- The ones that are being multiplied by $g(x)$
- The ones with exponent $<deg(g)$
Then the sum of terms of type (1) is a polynomial being multiplied by $g(x)$, and sum of terms of type (2) is a polynomial of degree $<deg(g)$.
Example: $f(x)=x^3-1$, $g(x)=x+1$.
Then for the first term in $f(x)$, $x^3$, we can write $x^3=x^2(x+1)-x^2$. Substitute into the original expression: $f(x)=x^2(x+1)-x^2-1$. So we have just converted $x^3$ into two terms: $x^2(x+1)$ and $-x^2$. We can do the same thing for any term $deg\ge x+1$. The rest of the terms are gonna have $deg<x+1$.
full example:
$$f(x)=x^3-1=x^2(x+1)-x^2-1=x^2(x+1)-x(x+1)+x-1=x^2(x+1)-x(x+1)+(x+1)-2,$$
so $$f(x)=(x^2-x+1)(x+1)-2$$
(Too long for a comment.)
I upvoted your question for being a well asked
solution-verificationquestion, and I tried to point out where the hole is in the comments, but apparently failed at that. Here is one more and last attempt, putting side-by-side the body of your answer against the simple example you worked out at the end $\,(x^3-1)\,/\,(x+1)\,$.$$ \begin{align} 1 \cdot x^3 &= x^2 \cdot (x+1) - x^2 \\ 0 \cdot x^2 &= 0 \cdot (x+1) \\ 0 \cdot x\,\, &= 0 \cdot (x+1) \end{align} $$
$$ \begin{align} x^3 - 1 \;&=\; \big(x^2 \cdot (x+1) - x \cdot (x+1) + 1 \cdot (x+1)\big) + \big( (-2) \cdot 1 \big) \\ &=\; (x^2-x+1)(x+1) - 2 \end{align} $$
You repeatedly claimed that the latter "follows from" the former. That's not obvious, not in the simple example here, and even less so in the general case. Until and unless you fill that gap, what you put forward is not a proof, but at best an intuition for the path towards an actual proof.