According to Hooke's law
$\therefore \quad \mathrm{F}_{\mathrm{p}}=-k_{\mathrm{p}} x_{\mathrm{p}}$
$F_{\mathrm{Q}}=-k_{\mathrm{Q}} x_{\mathrm{Q}} \Rightarrow \frac{F_{p}}{F_{Q}}=\frac{k_{p}}{k_{Q}} \frac{x_{p}}{x_{Q}}$
$F_{\mathrm{p}}=F_{\mathrm{Q}}[\text { Given }]$
$\therefore \frac{x_{p}}{x_{Q}}=\frac{k_{Q}}{k_{p}}$ $...(i)$
Energy stored in a spring is $\mathrm{U}=\frac{1}{2} k x^{2}$
$\therefore \quad \frac{U_{p}}{U_{Q}}=\frac{k_{p} x_{p}^{2}}{k_{Q} x_{Q}^{2}}=\frac{k_{p}}{k_{Q}} \times \frac{k_{Q}^{2}}{k_{p}^{2}}=\frac{1}{2}\left[\because k_{Q}=\frac{k_{p}}{2}\right]$
$\Rightarrow U_{p}=\frac{U_{Q}}{2}=\frac{E}{2} \quad\left[\therefore U_{Q}=E\right]$