Battery connected means V is fixed. Doubling d halves the capacitance.

(a)
| Quantity | Before | After | Change |
|---|
| Capacitance | C | C/2 | halves |
| Charge Q=CV | CV | CV/2 | halves |
| Field E=V/d | V/d | V/2d | halves |
| Energy U=21CV2 | 21CV2 | 41CV2 | halves |
(b) A charge ΔQ=CV/2−CV=−CV/2 is pushed back into the battery against its emf:
Wbattery=VΔQ=−21CV2
The battery does negative work: it is charged by 21CV2.
(c) Energy balance: work done by agent + work done by battery = change in stored energy.
Wagent+(−21CV2)=41CV2−21CV2=−41CV2
Wagent=+41CV2
The agent does positive work (the plates attract each other), yet the stored energy falls by 41CV2. Both amounts go into the battery: 41CV2+41CV2=21CV2.