ΔQ be the net heat given to the system in process (A+B) and ΔW be the net work done by the system in the process (A+ B).