We need to prove that p-1 is a factor of p^10+p^8+p^6-p^4-p^2-1, so since we have p-1 as a factor, we take p-1=0 or p=1.... 
So substituting p=1 in the equation, we get 1^10+1^8+1^6-1^4-1^2-1, which is equal to 1+1+1-1-1-1 =0.
Now, since we got a value of zero after substitution, that means p=1 is a factor, or (p-1) is a factor.