A combined amplitude analysis is performed for the decays B0→D¯D0s+π- and B+→D-Ds+π+, which are related by isospin symmetry. The analysis is based on data collected by the LHCb detector in proton-proton collisions at center-of-mass energies of 7, 8, and 13 TeV. The full data sample corresponds to an integrated luminosity of 9 fb-1. Two new resonant states with masses of 2.908±0.011±0.020 GeV and widths of 0.136±0.023±0.013 GeV are observed, which decay to Ds+π+ and Ds+π- respectively. The former state indicates the first observation of a doubly charged open-charm tetraquark state with minimal quark content [cs¯ud¯], and the latter state is a neutral tetraquark composed of [cs¯ūd] quarks. Both states are found to have spin-parity of 0+, and their resonant parameters are consistent with each other, which suggests that they belong to an isospin triplet.