We present a time-dependent density functional theory (TDDFT) based approach to compute the light-matter couplings between two different manifolds of excited states relative to a common ground state. These quantities are the necessary ingredients to solve the Kramers--Heisenberg equation for resonant inelastic X-ray scattering (RIXS) and several other types of two-photon spectroscopies. The procedure is based on the pseudo-wavefunction approach, where TDDFT eigenstates are treated as a configuration interaction wavefunction with single excitations, and on the restricted energy window approach, where a manifold of excited states can be rigorously defined based on the energies of the occupied molecular orbitals involved in the excitation process. We illustrate the applicability of the method by calculating the 2p4d RIXS maps of three representative Ruthenium complexes and comparing them to experimental results. The method is able to accurately capture all the experimental features in all three complexes, with relative energies correct to within 0.6 eV at the cost of two independent TDDFT calculations.