Using
Energy=12×Cequivalent×V2
We need to find the equivalent capacitance of the capacitor.
Using law for series combination of capacitors,
1Cnet=1C1+1C2+1C3
where, C1=Aϵ0x ( x is the width between capacitor walls and dielectric on one side )
C2=Aϵ0κ(d2)=4Aϵ0d
C3=Aϵ0(d2−x)
therefore,
1Cnet=x(Aϵ0)+(d2−x)(Aϵ0)+d(4Aϵ0)=3d(4Aϵ0)⇒Cnet=4Aϵ03d
Therefore energy =2Aϵ0V23d