Measurements of CP observables in B-+/- -> DK +/- and B-+/- -> D pi (+/-) decays are presented, where D represents a superposition of D-0 and D0 states. The D meson is reconstructed in the three-body final states KS0K +/- pi -/+ and KS0K -/+ pi +/-. The analysis uses samples of B mesons produced in proton-proton collisions, corresponding to an integrated luminosity of 1.0, 2.0, and 6.0 fb(-1) collected with the LHCb detector at centre-of-mass energies of s = 7, 8, and 13 TeV, respectively. These measurements are the most precise to date, and provide important input for the determination of the CKM angle gamma.