A capacitor is composed of two oppositely charged parallel plates that produce a magnetic field. That is why when it is placed in a circuit with an induced voltage, it can produce and store electricity. The equation relating this energy (E), the voltage (V) and the distance (d) between the plates of the capacitor is:
V = Ed
So if the voltage or potential difference is constant, then Ed=k. That means that any product of values of E and d would always be the same such that
E₁d₁ = E₂d₂
When d₂ is twice d₁, then d₂ = 2d₁:
E₁d₁ = E₂(2d₁)
E₂ = E₁/2
That means that the energy stored in the capacitor would decrease by a half.