We have the following circuit
From the left loop we have:
v1 = v +v0
From the right loop we have:
v2 = v0 – v’
But we have v = 4*(i2 – i1) = 4 V
vo = 8*(i2 – i3) = - 8V
and v’ = 10*(i3 – i1) = 20 V
Thus we get v1 = 4 – 8 = - 4V
And v2 = - 8 – 20 = - 24V
And finally we get R = (v + v’)/i1 = 24/2 = 12Ω