We say that an ideal $I \subseteq R$ is prime if for all $a, b \in R$, $ab \in I$ implies that $a \in I$ or $b \in I$.
(a) Prove that $I \subseteq R$ is prime if and only if $R/I$ is an integral domain.
Proof. First note that the zero element of the ring $R/I$ is $0 + I = I$ and that $a + I = I$ if and only if $a \in I$. Now suppose that $I \subseteq R$ is a prime ideal and consider nonzero cosets $a + I$ and $b + I$ in $R/I$ (i.e. consider $a \not \in I$ and $b \not \in I$). Since $I$ is prime this implies that $ab \not \in I$, hence $ab + I \neq I$ and we conclude that $R/I$ is an integral domain.
Conversely, let $R/I$ be an integral domain and consider $a, b \in R$ with $ab \in I$ (i.e. consider $ab + I = I$). Since $(a + I)(b + I) = ab + I = I$ and $R/I$ is an integral domain we conclude that either $a + I = I$ (i.e., $a \in I$) or $b + I = I$ (i.e., $b \in I$). Hence $I \subseteq R$ is a prime ideal.
My question is: how can they conclude that since $a,b$ don't belong to $I$ then it is an integral domain then prove the other way by stating that since it is an integral domain then $ab$ belong to $I$?