$R/(ab)\cong R/(a)\oplus R/(b)$, for $a$ and $b$ non-associate irreducible 
Let $a,b$ be non-associate irreducible elements in UFD $R$. Then 
   $$R/(ab)\cong R/(a)\oplus R/(b)$$

What is the isomorphism function I have to define?
Does $f(r+(ab))=(r+(a),r+(b))$ works here? If yes, how to show it is surjective?
I also need to understand something, Why do we need UFD?

Let $R = \mathbb{C}[X,Y], a = X -1, b = X +1$.  Then $$R/(ab) = \mathbb{C}[X,Y]/(X^2-1)$$ I am pretty sure this is not isomorphic to $R/(a) \times R/(b) \cong \mathbb{C}[X] \times \mathbb{C}[Y] \cong \mathbb{C}[X,Y]/(XY)$.  
If they were isomorphic, then their prime ideal structures would have to be the same.
Let  $A  = \mathbb{C}[X]/(XY)$, $B = \mathbb{C}[X,Y]/(X^2-1)$.  These rings are both one dimensional and Noetherian.  Every Noetherian ring has only finitely many minimal prime ideals.
The minimal prime ideals of $A$ are $\mathfrak q_1 = (X)/(XY)$ and $\mathfrak q_2 = (Y)/(XY)$.  The minimal prime ideals of $B$ are $\mathfrak p_1 = (X+1)/(X^2-1)$ and $\mathfrak p_2 = (X-1)/(X^2-1)$.
For the ring $B$, every maximal ideal is of the form $(X-z_1,Y-z_2)/(X^2-1)$, where $z_1 = \pm 1$ and $z_2$ is any complex number.  Then every maximal ideal of $B$ contains exactly one of the minimal prime ideals $\mathfrak p_1, \mathfrak p_2$.
On the other hand, $(X,Y)/(XY)$ is a maximal ideal of $A$ which contains both minimal prime ideals $\mathfrak q_1, \mathfrak q_2$.  
