Theorem. Let $R$ be a commutative ring with $1$, and let $g(x)$ be a polynomial whose leading coefficient is not a zero divisor in $R$. Then for all nonzero polynomials $q(x)$, $\deg(qg) = \deg(q)+\deg(g)$.
Proof: Let $g(x) = a_nx^n+\cdots + a_0$, $q(x) = b_mx^m+\cdots+b_0$, where $b_m\neq 0$. The putative leading term of $q(x)g(x)$ is $a_nb_mx^{n+m}$; since $a_n$ is not a zero divisor, and $b_m\neq 0$, then $a_nb_m\neq 0$, so the degree of $qg$ is indeed $n+m$, as claimed. $\Box$
Corollary. Let $R$ be a commutative ring with $1$, and let $g(x)$ be a polynomial whose leading coefficient is not a zero divisor. If $q(x)g(x) + r(x) = q'(x)g(x)+r'(x)$, where each of $r$ and $r'$ is either $0$ or has degree strictly smaller than $g$, then $q(x)=q'(x)$ and $r(x)=r'(x)$.
Proof. We have $(q(x)-q'(x))g(x) = r'(x)-r(x)$. If $q\neq q'$, then the degree of the left hand side is at least $\deg(g)$, but the degree of the right hand side is strictly smaller than $\deg(g)$, a contradiction. So $q=q'$, hence $r'(x)=r(x)$, as desired. $\Box$
Corollary. If $(x-a)^nq(x) = (x-a)^mq'(x)$, with $q(a)\neq 0$, $q'(a)\neq 0$, and $n,m$ positive integers, then $n=m$.
Proof. Without loss of generality, assume $n\leq m$. Then we have $(x-a)^nq(x)+0 = (x-a)^n\Bigl( (x-a)^{m-n}q'(x)\Bigr) + 0$. Therefore, $q(x)=(x-a)^{m-n}q'(x)$; evaluating at $a$, we get $q'(a)(x-a)^{m-n}=q(a)\neq 0$, so $m-n=0$. $\Box$
Corollary. The notion of multiplicity of a root in a polynomial ring over a commutative ring with $1$ is well-defined.