If the 3 ohm resistor is in parallel to the 12 ohm (I can't see it in the image) then the current through it is 12V/3ohm = 4A Amps are Coulombs/s The charge on the electron is 1.6e-19C So 4 amps means 4/1.6e-19 = 2.5e19 electrons/s.
The reciprocal of this gives the number of electrons per second:
1/2.5e19 = 4e-20 s/(elect. charge)
The power in the 3 ohm resistor is 12*4=48W. This is Joules/sec. We know it takes on average 4e-20 s to get one electron charge through the resistor so we multiply: 48W * 4e-20s = 1.9e-18J
Note: In reality there are many electrons moving through the resistor together, and a single electron does not move this fast, but the total energy to do it would be equivalent to this.