J.R. S. answered 05/01/19
Ph.D. University Professor with 10+ years Tutoring Experience
Internal energy (U) is the total energy of the system. All else being equal, if you add 30 J to the system, the U would change by + 30J. Then, if the system does 20 J of work on the surroundings, it would lose 20 J. So the net change in internal energy, ∆U = +10 J.