We know that half the energy supplied by the battery is lost as heat while charging the capacitor it means if a battery supplies the energy EB, then the energy store in the capacitor is 12EB.
Now, from the question
equivalent capacitance =C1C2C1+C2=10×2010+20=200/30=203
Energy stored in this capacitors =12CV2=12×2030×(6)2=10×12=120
Total charge =CV=203×6=40μC
Thus potential drop across the capacitor (C1) is given by V1=4010=4
and potential drop across the capacitor (C2) is given by V2=4020=2
Energy stored in C1=12×40×4=80
Energy stored in C2=12×40×2=40=E (given)
Thus energy stored in capacitor C1=2E
Thus total energy in the capacitors =120=3E
Hence energy supplied by battery =2×3E=6E