The plate separation in a parallel plate condenser is d and plate area is A. If it is charged to V volt and battery is disconnected then the work done in increasing the plate separation to 2d will be
32ϵ0AV2d
q=CV=(ε0Ad)V
After charging q will become constant.
W=Uf−Ui
=q22Cf−q22Ci
=q22(1Cf−1Ci)
=(ε0AV/d2)2(2dε0A−dε0A)
=ε0AV22d