Answer
$F=-\frac{q^2}{2 \varepsilon_0 A} $
Work Step by Step
For a capacitor with surface area $A$ and plate separation $x$ its capacitance is given by $C_0=\varepsilon_0 A / x$. The energy stored in the capacitor can be written as
$
U=\frac{q^2}{2 C}=\frac{q^2}{2\left(\varepsilon_0 A / x\right)}=\frac{q^2 x}{2 \varepsilon_0 A} .
$
The change in energy if the separation between plates increases to $x+d x$ is
$
d U=\frac{q^2}{2 \varepsilon_0 A} d x .
$
Thus, the force between the plates is
$
F=-\frac{d U}{d x}=-\frac{q^2}{2 \varepsilon_0 A} .
$
The negative sign means that the force between the plates is attractive.