Find all polynomials $P(x)$ with real coefficients satisfying: $P(2017) = 2016$ and $$(P(x)+1)^2=P(x^2+1).$$
1. Given the polynomial \( P(x) \) with real coefficients, we need to satisfy the conditions:
   \[
   P(2017) = 2016
   \]
   and
   \[
   (P(x) + 1)^2 = P(x^2 + 1).
   \]

2. Let's assume \( P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_0 \). We need to compare the degrees and coefficients on both sides of the equation \( (P(x) + 1)^2 = P(x^2 + 1) \).

3. First, consider the degree of the polynomial. The left-hand side \( (P(x) + 1)^2 \) will have a degree of \( 2n \) if \( P(x) \) is of degree \( n \). Therefore, the right-hand side \( P(x^2 + 1) \) must also be of degree \( 2n \). This implies that \( P(x) \) must be a polynomial of degree \( n \) such that \( P(x^2 + 1) \) is of degree \( 2n \).

4. Now, let's expand \( (P(x) + 1)^2 \):
   \[
   (P(x) + 1)^2 = P(x)^2 + 2P(x) + 1.
   \]

5. For the right-hand side, substitute \( x^2 + 1 \) into \( P(x) \):
   \[
   P(x^2 + 1) = a_n (x^2 + 1)^n + a_{n-1} (x^2 + 1)^{n-1} + \cdots + a_0.
   \]

6. To satisfy the equation \( (P(x) + 1)^2 = P(x^2 + 1) \), we need to compare the coefficients of the polynomials on both sides. 

7. Assume \( P(x) = x^n + a_0 \). Then:
   \[
   (P(x) + 1)^2 = (x^n + a_0 + 1)^2 = x^{2n} + 2(a_0 + 1)x^n + (a_0 + 1)^2.
   \]

8. On the other hand:
   \[
   P(x^2 + 1) = (x^2 + 1)^n + a_0.
   \]

9. For these to be equal, the coefficients of \( x^{2n} \), \( x^n \), and the constant term must match. This implies:
   \[
   x^{2n} + 2(a_0 + 1)x^n + (a_0 + 1)^2 = (x^2 + 1)^n + a_0.
   \]

10. By comparing the coefficients, we see that \( a_0 + 1 \) must be zero for the constant term to match. Thus, \( a_0 = -1 \).

11. Therefore, \( P(x) = x^n - 1 \).

12. Given \( P(2017) = 2016 \), we substitute \( x = 2017 \):
    \[
    2017^n - 1 = 2016.
    \]

13. Solving for \( n \):
    \[
    2017^n = 2017 \implies n = 1.
    \]

14. Thus, the polynomial \( P(x) \) is:
    \[
    P(x) = x - 1.
    \]

The final answer is \( \boxed{P(x) = x - 1} \).