As per Bohr model for hydrogen atom,energy of $n^{th}$ electron orbital is given by $\dfrac{-13.6}{n^2}$ eV.
Energy of electron in the first orbit will be $-13.6$ eV and in second orbit will be $-3.4$ eV. For transition, the electron requires $10.2$ eV to be given. This will increase the potential energy of the electron but the potential energy of the nucleus should also increase as two oppositely charge particle separation increases.
From where does that nucleus acquire that energy?