The Mongol DOW on him threw off my plans as I certainly did not want him to cap Gandhi. However, maybe I should have take the risk. Regardless, I capped Gandhi that turn. Oh..I did think about bribing Kublai out of the war but he was asking an arm and leg.
One thought is that since you were going to declare war on Kublai later anyway, would it really matter if Gandhi capitulated? Had that even happened, and had you had sufficient forces, you could have just immediately declared war on Kublai and then attacked whichever Cities (Kublai's or Gandhi's) that you preferred to attack first.
A possible downside is that you'd be suffering from all of the War Weariness against Gandhi while also facing a new opponent and a new potential source of War Weariness, but if there hadn't been a lot of warring against Gandhi to date, or had you had a large supply of Happiness Resources, then it might not have been much of an issue.
Again, a third option would have been to have taken Peace with Gandhi and then declared war on Kublai BEFORE ENDING THE TURN. Had you taken Peace, it would have been enforced for 10 turns, meaning that Gandhi would have been unable to capitulate to Kublai for 10 turns (as capitulating would mean that Gandhi would be forced to accept the Master's war and peace statuses, meaning that Gandhi would have been required to declare war on you)... and since declaring war on you would have been impossible, Gandhi would have been prevented from capitulating for 10 turns (as long as you remained at war with Kublai), such that you would not have had to fight both of them at once while still keeping open the possibility of taking Gandhi's Wonders later.
Of course, Gandhi could have potentially Peace Vassaled to someone else in the meantime, but then that AI would have had to have declared war on Kublai, giving you another war ally... since taking on a Peace Vassal is kind of like the opposite of taking on a Capitulation, in that the Master has to take on the wars that the new Peace Vassal was already involved in. Yes, it can get very confusing if you don't work through the logic (pencil and paper help here).
Vassals can be a tricky concept to master, but the mechanic seems to do a very good job of keeping you from picking on an AI that has basically already been defeated. So, one way to avoid being taken advantage of by this game mechanic is to try and play the way that the designers/developers seem to have been pushing us towards playing and instead of continuing to pick on a defeated AI, making Peace with said AI and declaring war on a tougher AI target.
You still would not have gotten Gandhi's Wonders immediately, but you would have at least had Gandhi as a war ally for 10 turns while having the option to take his Wonders later (an option that you gave up by taking him on as a Vassal). Sometimes, it can pay a lot to play this kind of "triangle diplomacy" aka "stab your ally in the back before they stab you by stealing your conquest target as their Vassal" in a game where Vassals are enabled.