Polynomial with integer coefficients of degree d 
Let $P(X)$ be a polynomial with integer coefficients of degree $d>0$.
$(a)$ If $\alpha$ and $\beta$ are two integers such that $P(\alpha)=1$ and $P(\beta)=-1$ , then prove that $|\beta - \alpha|$ divides $2$.
$(b)$ Prove that the number of distinct integer roots of $P^2(x)-1$ is atmost $d+2$.

Let $P(X)=a_0+a_1x+a_2x^2+... +a_dx^d$where $a_0, a_1,..., a_d$ are inegers . Then $P(\alpha)-P(\beta)=a_1(\alpha-\beta)+a_2(\alpha^2-\beta^2)+... a_d(\alpha^d-\beta^d)$. It is clear that $\alpha-\beta$ divides $P(\alpha)-P(\beta)$. I am not able to solve second part. Any ideas? Thanks.
 A: As commented, we consider the roots of $P(x)=1$ and $P(x)=-1$. If the roots are from solely one of the equations, then we are done. Now suppose that the roots are from both equations. We can imagine that one solution of the first equation as a white(W) ball, one solution of the other equation as a black(B) ball. Notice $|\alpha-\beta|$ divides 2, if a solution B exsits, there is at most 4 solutions W exsit, namely B-2,B-1,B+1,B+2, otherwise the distance is lager than 2. We have the following cases:


*

*All 4 solutions W exist. In this case, we can not find another solution B, since the distance of some W and the new B will always be larger than 2. Therefore we have at most $d+1$ solutions, namely $d$ from the first and 1 from the second.

*3 solutions W exist.  There are two case: WWBW* or WWB*W, where * stands for that this number is no solution of the both equaitons. In the first case, it is impossible to give a new B, and we have at most $d+1$ solutions; in the second case, we have at most one extra solution $B-1$, and we can not find anymore solutions B. Therefore we have at most $d+2$ solutions. 

*2 solutions W exist. There are 3 possibilities: $*WBW*, W*BW*,W*B*W,WWB**$. In the first and third case, we can not add one more B solution, therefore we have at most d+1 solutions. In the second case, we can add at most one more B solution, and we have at most d+2 solutions. In the fourth case, we have at most one more B solution, namely BWWB, and we can not add anymore B solution. We have then at most d+2 solutions.

*1 solution W exist. It is then WB. We now have 3 possibilities to add new solution B: $B*WB*,*BWB*,**WBB$, but this go back to previous, and we can add at most 2 more W solutions, and therefore we have at most d+2 solutions. This completes the proof.
A: Hint:
$$P^2(x)-1=(P(x)+1)(P(x)-1)$$
$$(P(x)+1)(P(x)-1)=0$$
$$a_0-1+a_1x+a_2x^2+....+a_dx^d=0\tag{d roots possible}$$
$$a_0+1+a_1x+a_2x^2+....+a_dx^d=0\tag{d roots possible}$$
