According to the law of conservation of energy the total energy in a system is constant. Any work done to introduce energy into the system increases the potential energy of the system and any work done in a process that expels energy out of the system decreases the internal energy in the system.
1. Here we have 849 J of energy added to the gas in the form of heat. This makes the gas expand and it does 702 J of work on its surroundings. The change in the internal energy is the difference 849 - 702 = 147 J
The internal energy of the gas increases by 147 J
2. When the gas does work equal to 890.6 J, the same amount of energy must be added to it, else there will be a fall in the internal energy.
To keep the internal energy at the end of the process the same as the internal energy at the start of the process 890.6 J of energy has to be added.