The potential difference at the terminals of the first cell will equal zero if R = r₁-r₂. This can be seen from the following points. The current in the circuit
I = 2E/(r₁ + r₂ + R)
The potential difference at the terminals of the first cell
V₁ = E - Ir₁ = E - 2Er₁/(r₁ + r₂ + R) = E(r₂ - r₁ + R)/(r₁ + r₂ + R)
Clearly
V₁ = 0 if r₂ - r₁ + R = 0, i.e. R = r₁ - r₂.