integral solutions to a prime number? 
Find the number of non-negative integer solutions to:
  $$(x_1+x_2+\cdots + x_n)(y_1+y_2+\cdots + y_p)=P$$
  where $n\in\mathbb{N}$ and $P$ is a prime number. 

I know the answer is $2n\binom{p+n-1}{p}$ but I don't understand why?

Hint: $ P $ being prime means that its factors are $ 1 $ and $ P $, so the integer solutions to that equation satisfy either
$$ x_1 + \dots + x_n = 1 \text{ and } y_1 + \dots + y_p = P$$
or
$$ x_1 + \dots + x_n = P \text{ and } y_1 + \dots + y_p = 1 $$
So your answer should be the sum of the numbers of solutions to these two sets of equations
