The linewidths and the energy shifts of the resonant states of the impurity electron in GaAs-based quantum wells (QWs) with infinite barriers are calculated. The two-dimensional Schrödinger equation for the charge impurity in the QW is solved by the developed finite-difference method combined with the complex-scaling technique. A dependence of the linewidths and energy shifts on the QW width for the impurity localized in the center of the QW is studied. The calculated results extend and improve theoretical estimations of these quantities in the GaAs-based QW by Monozon and Schmelcher [Phys. Rev. B 71, 085302 (2005)]. In particular, in agreement with their studies we obtain that resonant states originating from the second quantum-confinement subband have negligibly small linewidths. In contrast to previous estimations, we show that for the QW widths of the order of the electron impurity's Bohr radius the linewidths of resonant states associated with the third quantum-confinement subband linearly depend on the thickness of the QW. We show how the previous theoretical predictions can be improved for such QW widths. We also calculate linewidths for the case when the electron impurity is localized away from the center of the QW.