Question: what is the difference between work done on a system and work done by a system?
Answer: Work done on the system means something outside the system did something (other than heat flow into the system) to increase the internal energy of the system. Work done by the system means the system's internal energy decreased as it did work on something outside the system.