Answer
$R=994$ ohm
Work Step by Step
Let the direction of current be counter-clockwise, then according to the loop rule:
$-\epsilon_1-ir_1-iR-ir_2+\epsilon_2=0$
$-\epsilon_1-ir_1-ir_2+\epsilon_2=iR$
$R=\frac{\epsilon_2-\epsilon_1-i(r_1+r_2)}{i}$
Putting the values in the formula and solving:
$R=\frac{3-2-1\times10^{-3}(3+3)}{1\times10^{-3}}$
$R=994$ ohm