The energy of an electron in the ground state ($n = 1$) for $\text{He}^+$ ion is $-x$ J, then that for an electron in $n = 2$ state for $\text{Be}^{3+}$ ion in J is:
$E \propto Z^2/n^2$. He⁺: $4/1 = 4$. Be³⁺ at $n=2$: $16/4 = 4$. Ratio is 1, so energy is $-x$ J.