Net resistance of the circuit $=r_{1}+r_{2}+R$
Net emf in series $=E+E=2 E$
Therefore, from Ohms law,
current in the circuit $i=\frac{\text { Net emf }}{\text { Net reistance }} $
$\Rightarrow i=\frac{2 E}{r_{1}+r_{2}+R}$ ...(i)
It is given that, as circuit is closed, potential difference across the first cell is zero.
That is, $V=E-i r_{1}=0 $
$\Rightarrow i=\frac{E}{r_{1}}$
Equating Eqs. (i) and (ii), we get
$\frac{E}{r_{1}}=\frac{2 E}{r_{1}+r_{2}+R}$
$ \Rightarrow 2 r_{1}=r_{1}+r_{2}+R $
$\therefore R =$ external resistance $=r_{1}-r_{2}$