As commented by Georges Elencwajg, this is a special case of the prime avoidance Lemma.
Here is a proof for your situation.
Assume the claim is wrong.
First we deal with the special case that $I$ is a subset of the union $I_1 \cup I_2$ of any two of the three ideals $J_1, J_2$ and $P$. Then by our assumption there is an $a\in I\setminus I_2$ and a $b\in I\setminus I_1$. Since $I\subset I_1\cup I_2$, $a\in I_1$ and $b\in I_2$ and from $a + b\in I$ we get w.l.o.g. $a + b\in I_1$. Thus $b = (a + b) - a\in I_1$, contradiction.
It remains to consider the case that there exist elements $a\in I\setminus (P \cup J_1)$, $b\in I\setminus (P\cup J_2)$ and $p\in I\setminus (J_1\cup J_2)$. Then $a\in J_1$, $b\in J_2$ and $p\in P$. The element $x = ab + p$ is in $I$ and therefore in at least one of the ideals $J_1$, $J_2$ or $P$.
If $x\in J_1$, then $p = x - ab\in J_1$ (note that from $a\in J_1$ and the ideal property of $J_1$ it follows that $ab\in J_1$). Contradiction.
In the same way, $x\in J_2$ yields a contradiction.
If $x\in P$, then $ab = x - p\in P$. From the primality of $P$ we get $a\in P$ or $b\in P$, which is again a contradiction.