The energies of the 2pσ and 2scr states of H2+ and HeH2+and those of the a3, A1, b3, B1Ʃ+ states of HeH+ are calculated up to second order in the heavy nuclear charge. For the one-electron systems the first-order equation is solved analytically employing a special separation technique for degeneracies. The consideration of screening enables a recently proposed interchange result for the degenerate case to be tested. The results for the 2sσ states are good while those for the 2pσ states are only good at small internuclear distances. For the two-electron systems the method employed is a single perturbation approach for two perturbations in the presence of degeneracy. The results for HeH+ appear to be good only at small internuclear distances. The corresponding results for the excited states of H2 are omitted since an interesting problem arises at first order.