Answer
$x=\Big(\frac{q^2L}{2\pi\epsilon_0mg}\Big)^{1/3}$
(See step by step work)
Work Step by Step
Two tiny conducting balls of identical mass $m$ and identical charge $q$ hang from nonconducting threads of length $L$. At equilibrium, the charges are separated by a distance $x$.
Now the forces action on the right side ball are
$(i)$ The electrostatic force: $F=\frac{1}{4\pi\epsilon_0}\frac{q^2}{x^2}$, directed towards left.
$(ii)$ Weight of the ball: $W=mg$, directed vertically downward
$(iii)$ Tension in the threads: $T$, directed along the treads.
$T$ can be decomposed into two components:
Along positive x-component: $T\sin\theta$
and along positive y-component: $T\cos\theta$
At equilibrium,
$T\sin\theta=\frac{1}{4\pi\epsilon_0}\frac{q^2}{x^2}..................(1)$
and $T\cos\theta=mg.................(2)$
Dividing (1) by (2), we obtain
$\tan\theta=\frac{1}{4\pi\epsilon_0}\frac{q^2}{mgx^2}$
The angle $\theta$ is very small. Therefore
$\sin\theta\approx \tan\theta=\frac{1}{4\pi\epsilon_0}\frac{q^2}{mgx^2}$
or $\frac{x/2}{L}=\frac{1}{4\pi\epsilon_0}\frac{q^2}{mgx^2}$
or, $x^3=\frac{1}{2\pi\epsilon_0}\frac{q^2L}{mg}$
or, $x=\Big(\frac{q^2L}{2\pi\epsilon_0mg}\Big)^{1/3}$