The relativistic Fock-space coupled-cluster method for the direct calculation of ionization potentials and excitation energies (including fine structure) is applied to the 4f2 levels of Pr+3 and the 5f2 levels of U+4. The no-pair Dirac-Coulomb-Breit Hamiltonian is taken as the starting point. Correlation is treated by the coupled-cluster singles-and-doubles approximation, which includes single and double virtual excitations in a self-consistent manner, incorporating therefore the effects of the Coulomb and Breit interactions to all orders in these excitations. Extensive basis sets of kinetically balanced four-component Gaussian spinors are used to span the atomic orbitals. All levels appear in correct order. The average error of the excitation energies with the best basis is 222 cm-1 for Pr+3 and 114 cm-1 for U+4. Fine-structure splittings are obtained with even better accuracy.