This was the initial question and one of the methods to work it out include this:

The second method uses the fact when $n$ is a positive integer $x − 1$ is a factor of $x^n − 1$,
since, for $n ≥ 2$,
$$x^n − 1 = (x − 1)(x^{n−1} + x^{n−2} + \ldots + x + 1).$$

Hence, putting $x = 4$, we deduce that, for each positive integer $n, 3$ is a factor of $4^n − 1$. Therefore $4^n −1$ is not prime except when $n = 1$ and $4^n −1 = 3$. So there is just one positive integer $n$ for which $4^n − 1$ is a prime number.

However, I don't understand the initial method and how they deduced that $x-1$ is a factor of $x^n - 1$