You need to prove that polynomials satisfy basic axioms of ring for addition and multiplication.
Let $P(x)=\sum_{i=0}^na_ix^i, \:Q(x)=\sum_{i=0}^mb_ix^i$.Then $$ P(x)+Q(x)=\sum_{i=0}^n(a_i+b_i)x^i=\sum_{i=0}^n(b_i+a_i)x^i=Q(x)+P(x) $$ This proves polynomials is commutative for addition. $$ P(x)Q(x)=\sum_{i=0}^n\sum_{j=0}^i(a_jb_{i-j})x^i=\sum_{i=0}^n\sum_{j=0}^i(b_{i-j}a_j)x^i=Q(x)P(x) $$ This proves polynomials is commutative for multiplication.
So I found this proof and I don't understand where the $m$ went from $Q(x)$. Why does the $m$ disappear when we add $P(x)$ and $Q(x)$? Was this an error?
Without loss of generality you can assume that both polynomials have the same degree, as you can always extend it by zero coefficients. This is common practice, so I think the author simply forgot to mention it (which is a fauxpas but happens)