Let $p$ be a certain prime number. Find all non-negative integers $n$ for which polynomial $P(x)=x^4-2(n+p)x^2+(n-p)^2$ may be rewritten as product of two quadratic polynomials $P_1, \ P_2 \in \mathbb{Z}[X]$.
To determine all non-negative integers \( n \) for which the polynomial \( P(x) = x^4 - 2(n+p)x^2 + (n-p)^2 \) can be rewritten as a product of two quadratic polynomials in \(\mathbb{Z}[X]\), we start by analyzing the roots of \( P(x) \).

1. **Finding the roots of \( P(x) \):**
   Let \( y = x^2 \). Then the polynomial \( P(x) \) can be rewritten as:
   \[
   y^2 - 2(n+p)y + (n-p)^2 = 0
   \]
   Solving this quadratic equation for \( y \), we get:
   \[
   y = \frac{2(n+p) \pm \sqrt{(2(n+p))^2 - 4(n-p)^2}}{2}
   \]
   Simplifying the discriminant:
   \[
   (2(n+p))^2 - 4(n-p)^2 = 4(n+p)^2 - 4(n-p)^2 = 4[(n+p)^2 - (n-p)^2]
   \]
   \[
   (n+p)^2 - (n-p)^2 = n^2 + 2np + p^2 - (n^2 - 2np + p^2) = 4np
   \]
   Thus, the discriminant simplifies to:
   \[
   4 \cdot 4np = 16np
   \]
   Therefore, the roots for \( y \) are:
   \[
   y = (n+p) \pm 2\sqrt{np}
   \]
   Let \(\alpha = n+p+2\sqrt{np}\) and \(\beta = n+p-2\sqrt{np}\). Then the roots of \( P(x) \) are \(\sqrt{\alpha}\), \(-\sqrt{\alpha}\), \(\sqrt{\beta}\), and \(-\sqrt{\beta}\).

2. **Rewriting \( P(x) \) as a product of two quadratic polynomials:**
   Since \( P(x) \) can be rewritten as a product of two quadratic polynomials in \(\mathbb{Z}[X]\), we consider the possible cases for the roots of these quadratic polynomials.

   **Case 1:** \( P_1(x) \) has roots \(\sqrt{\alpha}\) and \(-\sqrt{\alpha}\).
   \[
   P_1(x) = x^2 - \alpha
   \]
   For \( P_1(x) \) to have integer coefficients, \(\alpha\) must be an integer. Thus:
   \[
   n + p + 2\sqrt{np} \in \mathbb{Z}
   \]
   This implies that \( \sqrt{np} \) must be an integer, so \( np \) is a perfect square. Let \( n = pk^2 \) for some integer \( k \). Then:
   \[
   P(x) = (x^2 - p(k-1)^2)(x^2 - p(k+1)^2)
   \]

   **Case 2:** \( P_1(x) \) has roots \(\sqrt{\alpha}\) and \(\pm\sqrt{\beta}\).
   \[
   P_1(x) = x^2 - Sx + Q
   \]
   where \( S = \sqrt{\alpha} \pm \sqrt{\beta} \). Then:
   \[
   S^2 = (\sqrt{\alpha} \pm \sqrt{\beta})^2 = \alpha + \beta \pm 2\sqrt{\alpha\beta}
   \]
   \[
   S^2 = (2n + 2p) \pm 2\sqrt{(n+p+2\sqrt{np})(n+p-2\sqrt{np})}
   \]
   Simplifying the product inside the square root:
   \[
   (n+p+2\sqrt{np})(n+p-2\sqrt{np}) = (n+p)^2 - (2\sqrt{np})^2 = n^2 + 2np + p^2 - 4np = n^2 - 2np + p^2
   \]
   \[
   S^2 = 2n + 2p \pm 2(n-p) = 2n + 2p \pm 2n - 2p
   \]
   If the sign is positive:
   \[
   S^2 = 4n
   \]
   Thus, \( 4n \) is a perfect square, so \( n \) must be a perfect square. Let \( n = k^2 \) for some integer \( k \). Then:
   \[
   P(x) = (x^2 - 2kx + k^2 - p)(x^2 + 2kx + k^2 - p)
   \]

   If the sign is negative:
   \[
   S^2 = 4p
   \]
   This implies \( p \) is a perfect square, which is a contradiction since \( p \) is a prime number.

Therefore, the solutions are \( n = k^2 \) and \( n = pk^2 \) for all integers \( k \).

The final answer is \( \boxed{ n = k^2 } \) and \( n = pk^2 \) for all integers \( k \).