(b) $\mathrm{\Delta}Q = \mathrm{\Delta}U + \mathrm{\Delta}W$ $\Rightarrow \ \mathrm{\Delta}U = \mathrm{\Delta}Q - \mathrm{\Delta}W = Q - W$ [using proper sign]
Physics Educator & NEET/JEE Specialist
Ph.D. in Physics with 19+ years of teaching experience.