Answer
Please see the work below.
Work Step by Step
The first law of thermodynamics is based on the conservation of energy. That is energy associated with an isolated system is constant.
The mathematical expression for the first law of thermodynamics is
$ \Delta U = q + W $
Where,
$ \Delta U$ = internal energy of the system
q = Heat absorbed or released by the system.
The heat absorbed is denoted by a positive sign.
The heat released is denoted by a negative sign.
W = Work done by the system or on the system.
Work done by the system is a negative sign.
Work done on the system is a positive sign.