The figure below shows the parallel plate capacitor with dielectric slab placed in between the plates.

Now, the effective capacitance of the combination is
Ceff=[104ϵ0(7×4)+1045ϵ0(1×4)]×10−2
=[70ϵ0+50ϵ0]×10−2=120ϵ0×10−2
⇒Ceff=1.2ϵ0
Electrostatics energy of this system is =21CeffV2
=21(1.2)ϵ0(20)(20)=240ϵ0