The paper presents a theory that solves analytically the time-dependent three-level problem of the scheme $\mathrm{discrete}\phantom{\rule{0.28em}{0ex}}|0\ensuremath{\rangle}\phantom{\rule{0.28em}{0ex}}\underset{\mathrm{as}\phantom{\rule{0.16em}{0ex}}\mathrm{pulse}\phantom{\rule{0.16em}{0ex}}{\ensuremath{\omega}}_{1}}{\overset{\mathrm{weak}\phantom{\rule{0.16em}{0ex}}}{\ensuremath{\rightarrow}}}\phantom{\rule{0.28em}{0ex}}\mathrm{resonance}\phantom{\rule{0.28em}{0ex}}|1\ensuremath{\rangle}\phantom{\rule{0.28em}{0ex}}\underset{\mathrm{fs}\phantom{\rule{0.16em}{0ex}}\mathrm{pulse}\phantom{\rule{0.16em}{0ex}}{\ensuremath{\omega}}_{2}}{\overset{\mathrm{moderately}\phantom{\rule{0.16em}{0ex}}\mathrm{strong}\phantom{\rule{0.16em}{0ex}}}{\ensuremath{\rightarrow}}}\phantom{\rule{0.28em}{0ex}}\mathrm{resonance}\phantom{\rule{0.28em}{0ex}}|2\ensuremath{\rangle}$, where $|0\ensuremath{\rangle}$ is a discrete state, and $|1\ensuremath{\rangle}$ and $|2\ensuremath{\rangle}$ are energy-normalized resonance states. The attosecond and femtosecond pulses with central frequencies ${\ensuremath{\omega}}_{1}$ and ${\ensuremath{\omega}}_{2}$ (${\ensuremath{\omega}}_{1}\ensuremath{\gg}{\ensuremath{\omega}}_{2}$) act with ultrashort time delay, ${t}_{D}$. The formalism leads to analytic expressions for photoelectron emission probabilities, ${P}_{i}(E,t)$, $i=1,2$, in the energy region of the two resonance states, whose calculation in terms of N-electron matrix elements and external control parameters can be carried out economically for any such three-level system. The problem is first solved analytically, within the rotating wave approximation, for the case where the femtosecond pulse is rectangular. The weak attosecond pulse can have any temporal shape. The final solution for two pulses with arbitrary shape (Gaussian in our case) is then achieved by fitting numerically the shape of the femtosecond pulse to a sum of rectangular pulses. The formulas for ${P}_{i}(E,t)$ involve, among other things, the Fano discrete-resonance asymmetry parameter $q$, and the resonance-resonance asymmetry parameter Q, defined by us in previous work. They also involve the complex energy poles of the two resonances, a result which accounts for the whole contribution of the open channels of energy-normalized scattering states into which they decay. The theory is applied to the calculation from first principles, using compact state-specific discrete and resonance wave functions, of observable aspects of the time-resolved dynamics associated with the processes $\mathrm{He}$ $1{s}^{2}$ $^{1}S$ $\ensuremath{\rightarrow}$ $(2s2p)$ $^{1}P^{o}$ $\ensuremath{\leftrightarrow}$ $(2{p}^{2})$ $^{1}D$. Calculations show that the $(2{p}^{2})$ $^{1}D$ resonance is 0.295 eV (4200 nm) below the energy of $(2s2p)$ $^{1}P^{o}$, (60.15 eV), and its width is 0.067 eV. For the transition $1{s}^{2}$ $^{1}S$ $\ensuremath{\rightarrow}$ $(2s2p)$ $^{1}P^{o}$, the full width at half maximum (FWHM) of the Gaussian pulse is 160 as. The few-cycle midinfrared pulse coupling the resonance states is also Gaussian, whose duration is varied in the range of a few decades of femtoseconds. Its intensity is in the range $5\ifmmode\times\else\texttimes\fi{}{10}^{10}--5\ifmmode\times\else\texttimes\fi{}{10}^{11}$ $\mathrm{W}/\mathrm{c}{\mathrm{m}}^{2}$. The external control parameters are the intensity and the FWHM of the femtosecond pulse, as well as the ${t}_{D}$. For a given value of ${t}_{D}$, the FWHM of the second pulse is a crucial control parameter. The results include the time-resolved formation of either the $(2s2p)$ $^{1}P^{o}$ or the $(2{p}^{2})$ $^{1}D$ resonance, while they are coupled with each other. For the $(2s2p)$ $^{1}P^{o}$ state, comparison is made with the case where the time-dependent buildup of its asymmetric profile, excited from $1{s}^{2}$ $^{1}S$ by the same attosecond pulse, is calculated in the absence of coupling to another resonance. The result is in harmony with that of our earlier work on this problem. For the $(2{p}^{2})$ $^{1}D$ resonance excited from $(2s2p)$ $^{1}P^{o}$, the time-resolved buildup of its profile does not develop into an asymmetric peak due to the fact that $Q$ has the very large value of $\ensuremath{\approx}\ensuremath{-}1300$. Instead, it finishes as an Autler-Townes doublet.