In a stable nucleus, are the total energies of neutrons and protons same?
In the nuclear shell model, you can assign "orbitals" to each nucleon analogous to the orbitals assigned to electrons. Like the electrons, you can promote a nucleon into an empty orbital above the Fermi energy by exciting the nucleus with a photon — a gamma ray rather than a visible photon. The structure of the energy levels is pretty complicated: much more like the messy electron energy levels in the lanthanides and actinides than the nice neat electron energy levels of the light atoms.
An interesting feature of the nuclear shell model is that there separate energy level spectra for neutrons and for protons. The energy levels for the protons are slightly further apart than the energy levels for the neutrons, because adding a proton requires overcoming its repulsion with the rest of the nucleus. For nuclei with $N=Z$ but heavier than calcium-40 or so, the neutron energy spectrum has a vacant level which is below the energy of the final proton. In this case the nucleus has a non-electromagnetic way to relax to a lower-energy state: one of those last few protons can transform into a neutron and move from the (high) proton Fermi level to the (lower) neutron Fermi level. This is positron decay, which occurs in proton-rich nuclei.
Similarly, you get beta decay from neutron-rich nuclei, when there is an available proton energy level which is below the energy of one of the last neutrons.
I'm having trouble finding a diagram that shows quite what I want it to, and I don't have time to make one. Here's a schematic energy level diagram showing the effect of the proton's Coulomb repulsion, not really to scale (source):
Let's use these energy level diagrams to figure out the properties of a nucleus with mass 12. For boron-12 ($Z=5,A=7$), both diagrams suggest that energy can be released by beta decay to carbon-12; accounting for Coulomb repulsion reduces the energy available in the decay. For nitrogen-12 ($Z=7,A=5$), both diagrams suggest that energy can be released by positron decay to carbon=12, but the the Coulomb repulsion increases the energy available in the decay. That predicts that nitrogen decay should be faster than boron decay, which is in fact the case (10 ms vs. 20 ms). Similarly the decay of fluorine-16 to oxygen is much faster than the decay of nitrogen-16 to oxygen.