Before connection , charges in each capacitor are given by
Q=CVQ1=2×10=20μC and
Q2=4×20=80μC
And energy stored in capacitors before the connection is given by
Ui=12C1V21+12C2V22
Ui=12×2×(10)2+12×4×(20)2=900μJ
When the capacitors are connected,
Equivalent capacitance of circuit is ,
Ceq=2+4=6μ F
And the net charge of circuit is
Qnet=−20+80=60μ C
Now the common voltage of capacitors is given by
V=QnetCeq
V=602+4=10 V
Energy stored in circuit is given by ,
Uf=12CeqV2
Substituting the data given in the question we get,
Uf=12×6×(10)2=300μJ
Heat generated in circuit is
=Ui−Uf=600μ J
Hece, option (b) is the correct answer.