We'll do the proof by mathematical induction on the difference between the degrees of the polynomial.
Base Case: To show: If $p(x)$ is a non-zero polynomial of degree $n$ and $q(x)$ is a non-zero polynomial of degree $m = n$ then there exists a polynomial $d(x)$ of degree $n-m =0$ (in other words a real constant) and a polynomial, $r(x)$ (maybe zero) of degree less than $m$ so that $p(x) = d(x)q(x) + r(x)$
Proof of base case. Let $p(x) = \sum_{k=0}^n a_kx^k; a_n\ne 0$ and $q(x) = \sum_{k=0}^n b_kx^k; b_n\ne 0$. Let $d(x) = \frac {a_n}{b_n}$ (which is a polynomial of degree $0$) and let $r(x)=\sum_{k=0}^{n-1}(a_k -\frac {a_n}{b_n}b_k)x^k$ (which is a polynomial of degree less than $m=n$; Note: it's possible for the leading terms $(a_{n-1} -\frac {a_n}{b_n}b_{n-1})$ or for any terms, $(a_{k}-\frac {a_n}{b_n}b_k)$ to be $0$. so it need not be of degree $n-1$-- it could be less; indeed the entire polynomial may be $0$. It is only required that it is degree less than $n$). And let $r(x)=\sum_{k=0}^{n-1}(a_k -\frac {a_n}{b_n}b_k)x^k=$ .
Then $d(x)q(x)+r(x)=\sum_{k=0}^n\frac {a_n}{b_n}b_k x^k +\sum_{k=0}^{n-1}(a_k -\frac {a_n}{b_n}b_k)x^k=$
$\sum_{k=0}^{n-1}(\frac {a_n}{b_n}b_k + a_k-\frac {a_n}{b_n}b_k)x^k + \frac {a_n}{b_n}b_nx^n=$
$\sum_{k=0}^{n-1}a_kx^k + a_nx^n = \sum_{k=0}^na_kx^k=p(x)$
Induction:
Induction Hypothesis: Assume we know that for any non-zero polynomial, $p(x)$ of degree $n$ and any non-zero polynomial, $q(x)$ of degree $m$ with $m \le n$ and $n-m \le D$ (for a specific non-negative integer $D$) then there will exist a non-zero polynomial, $d(x)$, of degree $n-m$, and a (possibly zero) polynomial $r(x)$ of degree less than $m$ so that $p(x)=d(x)q(x) + r(x)$.
Induction step to prove. If $p(x)$ and $q(x)$ are non-zero polynomials of degrees $n,m$ respectively and $n-m = D+1$ then we need to prove there exist $d(x),r(x)$ where degree of $d(x) = n-m$ and degree of $r(x) < m$.
Proof: Let $p(x) = \sum_{k=0}^n a_kx^k;a_n \ne 0$.
Let $w(x) = \frac {p(x)}x-a_0 = \sum_{h=0}^{n-1}a_{h+1}x^h$ is a polynomial of degree less than $n$. As $a_{n}\ne 0$ it is a polynomial of degree $n-1$.
Now as $(n-1)-m = (n-m)-1 = (D+1) -1 = D$ we know that there exist polynomials $\delta(x)$ of degree $(n-1) -m$ and $\rho(x)$ of degree less than $m$ so that $w(x) = \delta(x)q(x) + \rho(x)$.
And therefore $p(x) = x[w(x)] + a_0= x[\delta(x)q(x) +\rho(x)]+a_0=(x\delta(x))q(x) + (x\rho(x) + a_0)$.
Now $x\delta(x)$ is a polynomial of degree $(n-1)-m +1 = n-m$ and $x\rho(x)+a_0$ is a polynomial of less than $m+1$ so the degree of $x\rho(x)+a_0$ is less than or equal to $m$.
If the degree of $x\rho(x)$ is less than $m$ we are done: Let $d(x) = x\delta(x)$ and let $r(x) = x\rho(x) + a_0$ and we have $p(x) =d(x)q(x) + r(x)$.
If the degree of $x\rho(x) + a_0=m$ then by the induction process we have a polynomial of degree zero (in other words a constant), $v$ and a polynomial $s(x)$ of degree less than $m$ so that $x\rho(x) + a_0 = vq(x) + s(x)$.
In this case we are done: $p(x) = x\delta(x)q(x) + x\rho(x) + a_0 =x\delta(x)q(x) + vq(x) + s(x)= (x\delta(x) + v)q(x) + s(x)$. We just need to define $d(x) =x\delta(x) + v$ and $r(x) = s(x)$.
And.... that's it.
By induction we have shown that for any non-zero polynomials of degrees $n,m; n\ge m$ that so $n-m$ is an non-negative integer (which is always) then there exist a polynomial, $d(x)$ of degree $n-m$ and a polynomial, $r(x)$, of degree less than $m$ so that $p(x) =d(x)q(x) + r(x)$.
That's all.