Answer
36 V
Work Step by Step
$Energy=\frac{1}{2}CV^{2}$
Using the above equation, for capacitor B, we can write
$3.4\times10^{-4}\,J=\frac{1}{2}C\times(12\,V)^{2}$
$\implies C=\frac{3.4\times10^{-4}\,J\times2}{(12\,V)^{2}}=4.7\times10^{-6}\,F$
As the capacitors are identical, C is same for A. Using the equation $E=\frac{1}{2}CV^{2}$, for capacitor A, we have
$3.1\times10^{-3}\,J=\frac{1}{2}\times4.7\times10^{-6}\,F\times (V_{A})^{2}$
$\implies V_{A}=\sqrt {\frac{3.1\times10^{-3}\,J\times2}{4.7\times10^{-6}\,F}}=36\,V$