The initial and final stored energy in the capacitor, Ui and Uf?
The initial parallel plate capacitance is Ci=Aϵ0dand the charge is Qi=CiVi=Aϵ0Vd
The final parallel plate capacitance is Cf=Aϵ02d
and charge is Qf=CfVf=Aϵ0Vf2d
As the battery is disconnected so the charge will remain constant so,
Qi=Qf
or Aϵ0Vd=Aϵ0Vf2d
or, Vf=2V
Thus, initial energy stored, Ui=12CiV2i=Aϵ0V22d and final energy stored, Uf=12CfV2f=Aϵ0(2V)24d=Aϵ0dV2