Dear Student ,
Here in this case look if V be the voltage of the battery and q charge is accumulated in the batery then the energy supplied by the battery is , E = qV .
Now as we know that the energy stored in the capacitor while charging by a battery of voltage V is ,
Regards