charge on B = 2 X 12 = 24 microfarad
since A and B are in series....eq capacitance = 4/3 microfarad
now u can find out how 24 microfarad will be distributed on the 2 capacitors
24/(4+2) = 4 microfarad......so
charge on B = 4 X 2 = 8 microfarad
charge on A = 4 X 4 = 16 microfarad
so wateva be the value of charge on 4 microfarad capacitor.....find out the heat in transfering that amount of charge ((CV^2)/2)
V = Q/C = 4
so answer according to me should be 32 J
is it correct??