The LHCb collaboration reported the observation of a narrow peak in the $D^- K^+$ invariant mass distributions from the $B^+to D^+ D^- K^+$ decay. The peak is parameterized in terms of two resonances $X_0(2900)$ and $X_1(2900)$ with the quark contents $bar{c}bar{s}ud$, and their spin-parity quantum numbers are $0^+$ and $1^-$, respectively. We investigate the rescattering processes which may contribute to the $B^+to D^+ D^- K^+$ decays. It is shown that the $D^{*-}K^{*+}$ rescattering via the $chi_{c1}K^{*+}D^{*-}$ loop or the $bar{D}_{1}^{0}K^{0}$ rescattering via the $D_{sJ}^{+}bar{D}_{1}^{0}K^{0}$ loop simulate the $X_0(2900)$ and $X_1(2900)$ structures. Such phenomena are due to the analytical property of the scattering amplitudes with the triangle singularities located to the vicinity of the physical boundary.