There is not going to be a war with China. It would harm them too much economically. It will render their American debt instruments virtually worthless; such a large conflict will disrupt global markets; and without American spending power they will lose one of their biggest markets. The idea is absurd.
In addition, even if China could defeat us in a war, it would be protracted conflict given the state of our militaries and China would emerge so bruised and battered that they would go into an economic recession and be susceptible to foreign influence like Russia.
Now, would China and Russia form an alliance to defeat America? Again, why would they even want to? With economies being global they would only be hurting themselves. Both countries have major investments in America. Let's say Putin attacks America, even with a Chinese alliance. NATO counter strikes. Russia owns half of Europe. So what will Russia do? Carpet bomb Europe and destroy its investments in order to quell a NATO counter strike? The idea is patently stupid.
Even if the 2 countries - China and Russia - decide to attack America, and thereby accept huge financial loss with an expectation of long term gain by winning the war and having a defeated America on its knees, the most efficient way to do this is nuclear war. It will keep actual armed conflict to a minimum if you use nukes, thereby mitigating to some degree the harm they will incur. However, for nuclear war to work you must have First Strike capability; that is, the ability to strike a decisive blow while suffering only relatively nominal and acceptable loss (I.e., you survive the counter-strike).
Russia and China both lack First Strike capability. If either or both attempt to launch their ICBMs at us they will be literally annihilated within a couple of hours. What good is an America on its knees if they are also on their knees?
This is an exercise in idiocy. We are not headed for a war with China. At least not in the next few decades.