Solution:
The only solutions are the polynomials P(x)=1 and P(x)=x−c, where c is a constant.
Suppose that P(x)=(x−c)(x−x2)⋯(x−xn) is a nonconstant polynomial, where c is its complex root whose real part is the smallest.
By the condition of the problem, x+1−c divides P(x)2−1, from which it follows that P(c−1)=±1. On the other hand, for 2⩽i⩽n we have ∣c−1−xi∣⩾1, so ∣P(c−1)∣=∏i=2n∣c−1−xi∣⩾1, and this is only possible if ∣c−1−xi∣=1, i.e. xi=c for all i.
It follows that P(x)=(x−c)n. However, P(x+c)2−1=x2n−1 is not divisible by P(x+c+1)=(x+1)n if n⩾2, so the only possibility is n=1.