Nobody likes a delusional 1.4 billion population nuclear armed state led by a fascist party on their doorsteps. US is a foreign superpower in a far away land, as President Xi said "the world is big enough to accommodate both countries". Once the US gives up the west pacific, then China and US can come to agreeable spheres of influence.
India on the other hand is a totally separate issue, I think in the long term India is China's primary security threat. I don't believe in China and India peaceful coexistence even if the border issue becomes resolved. If you think India is a headache now, just wait a few more decades when India possesses more nukes, then ask its neighbours.
I'm sounding the alarm on India by providing the Indian elite's and domestic perspective, which is honestly more antagonistic towards China than the US, which is still confused whether China, Russia or Iran is its top adversa