<s>[INST] How to get from $x^{p-1}-1$ to $(x-1)(x^{p-2}+x^{p-3}+\cdots+x+1)$? How would I get from $x^{p-1}-1$ to $(x-1)(x^{p-2}+x^{p-3}+\cdots+x+1)$? 
It make sense to me logically. When one multiplies it out, it would condense to $x^{p-1}-1$. But it's just not clicking. What is the arithmetic between these steps?
 [/INST] I'm not sure if this fully answers your question, however, when I am factoring higher degree polynomials (degree greater than 2) I often like to use the following trick that I will demonstrate below:
On polynomials like the one you have there, it is easy to see that $x=1$ is a zero of the polynomial $x^{p-1}-1$. Then you want to use the following trick where you kind of 'reverse' expand the polynomial:
\begin{align}
x^{p-1} - 1 &= x^{p-1} - x^{p-2} + x^{p-2} - x^{p-3} + x^{p-3} -...- x + x - 1 \\
&=  (x^{p-1} + x^{p-2} + x^{p-3} + ... + x) - (x^{p-2} + x^{p-3} + x^{p-4} +...+ 1) \\
&= x(x^{p-2} + x^{p-3} + x^{p-4} +...+ 1) - (x^{p-2} + x^{p-3} + x^{p-4} +...+ 1) \\
&= (x-1)(x^{p-2} + x^{p-3} + x^{p-4} +...+ 1) \\
\end{align}
So you basically add and subtract terms without changing the polynomial so it is easy to pull out the $(x-1)$ factor. Just as another example to better illustrate the technique on a polynomial you don't know the factors of:
Lets say we wanted to factor the polynomial $x^3 -9x^2 +26x -24$. With some quick trial and error you can find that $x=2$ is a zero of the polynomial. Then, as before, you want to rearrange the polynomial so that it easy to pull out the $(x-2)$ factor. We do it as follows:
\begin{align}
x^3 -9x^2 +26x -24 &= x^3 - 2x^2 - 7x^2 + 14x + 12x - 24 \\
&= (x^3 - 7x^2 + 12x) - (2x^2 - 14x +24) \\
&= x(x^2 -7x +12) - 2(x^2 - 7x + 12) \\
&= (x-2)(x^2 -7x +12)\\
\end{align}
So all we have done is leave the highest/lowest degree terms alone and split the middle terms into two parts, one a multiple of $x$ and the other a multiple of -2. It is then easy to rearrange the polynomial and factor out the $(x-2)$ factor. You can apply this technique to any polynomial that you already know a zero of, however, as you can imagine it gets messy if the zeroes of the polynomial aren't 'small' integers.
</s>