Expressions for the differential cross section of the resonance Raman scattering from molecules in which initially prepared nonequilibrium vibronic levels undergo vibrational and/or electronic relaxations are derived by using the generating function method. Two kinds of the initial nonequilibrium vibronic distributions, single vibronic level and Poisson ones are taken into account. A displaced harmonic oscillator model for the initial and resonant vibrational states and a linear vibrational quantum number dependence of the relaxation constants are adopted in deriving the cross sections. Model calculations of the time-resolved resonance Raman scattering cross sections and of the excitation profiles of the nth order Stokes and anti-Stokes Raman bands are performed by using the derived expressions. The results of the calculation indicate that the anti-Stokes Raman bands make a significant contribution to the resonance Raman scattering from the nonequilibrium vibronic distributions. It is suggested that measurements of the excitation profiles are useful for analyzing the nonequilibrium distribution initially prepared and the subsequent relaxation mechanism.