(a) Since, work is done by the system, so it is positive. Therefore,
$\mathrm{\Delta}W = 30J$
Heat given to the system,
$\mathrm{\Delta}Q = 40J$
According to first law of thermodynamics, change in internal energy is given by
$\mathrm{\Delta}U = \mathrm{\Delta}Q - \mathrm{\Delta}W$
$= 43 - 30 = 10\ J$