play phryzby with physics

Q. In changing the state of a gas adiabatically from an equilibrium state A to another equilibrium state B, an amount of work equal to 22.3 J is done on the system. If the gas is taken from state A to B via a process in which the net heat absorbed by the system is 39.18 J, how much is the net work done by the system in the latter case, in joules? expects 16.9 J