a
charge given by battery $=\frac{2 \mathrm{CV}}{3}-\frac{\mathrm{CV}}{2}$
$=\frac{C V}{6}$
$\Rightarrow$ work done by battery $=\frac{\mathrm{CV}^{2}}{6}$
Initial energy stored
$=\left(\frac{1}{2} \mathrm{C}\left(\frac{\mathrm{V}}{2}\right)^{2}\right) \times 2=\frac{\mathrm{CV}^{2}}{4}$
Final energy stored
$=\frac{1}{2} \mathrm{C}\left(\frac{2 \mathrm{V}}{3}\right)^{2}+\frac{1}{2} 2 \mathrm{C}\left(\frac{\mathrm{V}}{3}\right)^{2}=\frac{\mathrm{CV}^{2}}{3}$
$\Rightarrow \Delta \mathrm{U}=\frac{\mathrm{CV}^{2}}{3}-\frac{\mathrm{CV}^{2}}{4}=\frac{\mathrm{CV}^{2}}{12}$
$\mathrm{W}_{\mathrm{b}}=\Delta \mathrm{U}+$ Heat loss
$\frac{\mathrm{CV}^{2}}{6}=\frac{\mathrm{CV}^{2}}{12}+$ Heat loss
$\Rightarrow$ Heat loss $=\frac{\mathrm{CV}^{3}}{12}$
