$V_{A}=\frac{2 k q}{a}-\frac{2 k q}{a \sqrt{5}}$
$\Rightarrow V_{A}=\frac{1}{4 \pi E} \frac{2 q}{a}\left(1-\frac{1}{\sqrt{5}}\right)$
(Here potential due to each $q=\frac{k q}{a}$ and potential due to each $-q=\frac{-k q}{a \sqrt{5}}$)
Final potential of the charge
$V_{B}=0$
( $\because$ Point $B$ is equidistant from all the four charges)
$\therefore$ Using work energy theorem,
$\left(W_{A B}\right)_{\text {electric }}=Q\left(V_{A}-V_{B}\right)$
$=\frac{2 q Q}{4 \pi E_{0} a}\left[1-\frac{1}{\sqrt{5}}\right]$
$=\left(\frac{1}{4 \pi \varepsilon_{0}}\right) \frac{2 Q q}{a}\left[1-\frac{1}{\sqrt{5}}\right]$



