The first law of thermodynamics says that-
1
The change in internal energy is equal to work done by the system.
2
The work done by the system is equal to the heat exchanged.
3
The change in internal energy is equal to the difference between heat exchange and the work done.
4
The heat exchange is equal to the change in internal energy of the system.