From the figure,
Voltage across the current source = 10 V (Because it is connected parallel.)
So, power supplied by current source = 10*2
= 20 W
So, Power supplied by voltage source = 10 W
Current flow throught the voltage source = P/V = 1 A
So, total current flow through the resistor = 2 + 1 = 3 A
Voltage across resistor = 3 V
Value of R = 10/3
= 3.33 A