According to first law of thermodynamics,
U = Q+W
Where U = change in internal energy
Q = heat
W = work
According to this, there are two kinds of processes that can lead to a change in the internal energy of the system – they are heat and work.
Q = + 5kJ
W = -1 kJ