An engine with 100 J of heat compresses gas in a cylinder with 50 J of work. What is the change in internal energy of the gas?
A) 200 J
B) -150 J
C) 50 J
D) 150 J