Since the question is tagged "abstract algebra" let's use a little, viz. congruences.
Proof $\,\ {\rm mod}\,\ x-1\!:\,\ x\equiv 1\,\color{#c00}{\overset{\rm CP}\Rightarrow}\, x^n\equiv 1^n \ $ thus $\ x-1\mid x^n-1$
using $\,\rm\color{#c00}{CP}$ = Congruence Power Rule (or iterated Product Rule), whose simple proof is exactly the same as it is for the ring of integers, since it uses only commutative ring laws.
Or, specializing $\,a = x\!-\!1\,$ below (an inductive proof of first term of a binomial expansion), immediately yields that $\,x^n = 1 + (x\!-\!1)k,\,$ for $\,k\in\Bbb Z[x],\ $ so $\ x\!-1\mid x^n\!-\!1\,$ in $\,\Bbb Z[x].$
$$\begin{align} (1+ a)^n\, \ \ =&\,\ \ 1 + ak,\ {\rm some}\ k\in\Bbb Z,\ \ \ {\rm i.e.}\ \ P(n)\\[1pt]
\Rightarrow\ (1+a)^{\color{#c00}{n+1}}\! =&\ (1+ak)(1 + a)\\[2pt]
=&\,\ \ 1+ a\,(\underbrace{k\!+\!1\!+\!ka\!}_{\large k'\,\in\,\Bbb Z})\qquad\ \ {\rm i.e.}\ \ P(\color{#c00}{n\!+\!1})\\
\end{align}\qquad$$
The above is essentially a special case of the prior proof using congruences, without using the language of congruences (see here for how to write such proofs in congruence language).