If $A$ is a noetherian ring, prove that a closed set $X \subset \operatorname{Spec} A$ is irreducible if and only if $I(X)=\bigcap_{P \in X} P$ is prime.
This is the problem I am trying to solve. I tried to prove the contrapositive but I couldn't find $I(X_{1})$ and $I(X_{2})$ to find a contradiction.