Reputation won't be the problem for you in this instance. Your rep will take a little hit, but what's going to cause you more trouble will be the way the Chinese react, which will probably be to become furious. Apparently, you're not too afraid of your plucky Chinese brothers in arms, but they probably won't be too inclined to make peace with you after you cancel an alliance early and then attack them. That means you'll be fighting two wars: not impossible but a pain in the ass.
A better strategy would be to negotiate ROP with the Chinese, stack a bunch of your units outside Lahore, then wait until the Indians take it back. Then smash the Indians and grab it for yourself. Alternately, you could let the Chinese and Indians duke it out for a while and build up your forces in the region. When the twenty turns on the alliance are up, cancel it peacefully (give the Chinese a meaningless gift like gold or a useless tech to soften the blow), then attack the Chinese the next turn. With the intervening time to build up your forces, the double war won't be so bad.