The exotic states X_{0,1}(2900) with the quark flavor of csbar{u}bar{d} are recently observed in the mass spectrum of D^+K^- in B^-rightarrow D^-D^+K^- by the LHCb collaboration. To explore the nature of X_{0,1}(2900), except for analyzing their masses and decay widths as usually did in literatures, the study of their production mechanism in B-meson weak decays would provide another important information. The amplitude of B^-rightarrow D^- X_{0,1} is non-factorizable. We consider the final-state-interaction effects and calculate them via the rescattering mechanism. The measured branching fractions of B^-rightarrow D^- X_{0,1} are revealed. It is manifested by {B}^-rightarrow Lambda _c^-Xi _c^{(prime )0} and Lambda _b^0rightarrow P_c^+K^- that the rescattering mechanism can result in the relatively large branching fractions. The similar processes of B^-rightarrow pi ^-X_{0,1} are also analyzed. The isospins of X_{0,1} can be investigated by Brightarrow DX_{0,1}^{pm ,0} decays.