let the resistance of the two cells be 'r'
now,
when joined in series
RS = r + r + 1
or
RS = 2r + 1
the series current in this case would be
IS= V/R = 2E/RS
[V = E + E - total emf]
IS = 2E / (2r + 1)
and
when joined in parallel
1/RP = (1/r) + (1/r) + 1
RP = 1 + r/2
the parallel current in this case would be
IP = V/RP = E/RP
IP = E / (1 + r/2)
we are given
IS = IP
so,
2E / (2r + 1) = E / (1 + r/2)
2 + r = 2r + 1
thus,
r = 1 ohm