Im struggling to prove that if the function $\phi: R \to R/I \times R/J$ given by $\phi(x)=(x+I,x+J)$ is surjective then we have $R = I + J$. ($R$ is a commutative ring and $I$ and $J$ are ideals). I have proved that if $R=I+J$ then the map must be surjective but im not able to prove the converse. My attempts include trying to use the homomorphism theorem for rings, i.e we have $R/(I \cap J) \cong R/I \times R/J$, since the function is surjective and a homomorphism.
Although i cant make it...anyone with a solution or hint?