A sample gas does 150 j of work against its surroundings and loses 90 j of internal energy in the process. does the gas gain or lose heat, why