The first law of thermodynamics for a closed system is dU = dq + dw, where dw = `dw_(pv)+dw_("non-pv")`. The most common type of `w_("non-pv")` is electrical work. As per IUPAC convention work done on the system is positive.
A system generates 50 J electrical energy, has 150 J of pressure-volume work done on it by the surroundings while releasing 300 J of heat energy. What is the change in the internal energy of the sytem?
A. `-500`
B. `-100`
C. `-300`
D. `-200`