Errrr....why? The PLA can't amount an effective offensive operation vs the US in Korea because the PLA would get massacred against the US army unless zombie MacArthur was in charge or something.
The US then park a submarine or two in the Taiwanese strait and sends fighters over Taiwan itself.
What now
The US only has 29,000 troops in South Korea. The only way it forms part of a credible ground defence against North Korea (other than technological advantage) is that it's integrated into South Korea's military defence. South Korean has about 3.5 million people in its military (including reserves), which makes a huge numerical advantage.
If the South Koreans are ambivalent about supporting the US against China and are more likely to play a neutral role / side with the Chinese, then the US is left with 29,000 troops to face however many hundreds of thousands the Chinese can and will throw in. Sure, the US can ship in more from Japan, but given that there are only 50,000 military personnel in Japan (across all military service branched) and the US has to get them into Korea to fight the PLA in the first place, China still has an overwhelming majority. Plus the Koreans may join in to get the US out and to fight against them for starting an unnecessary war against China on Korea's territory.
China is a couple of generations behind the US in terms of military tech (but is catching up), but makes up for it with numbers. Korea is on a par with the US. The US would struggle badly against the PLA in Korea with no Korean support and would be wiped out if Korea joins in on China's side.
With regards to Taiwan, Taiwan is not an ally of the US in the same way other allies are. Taiwan and the US do not have full diplomatic relations for starters and the US does have diplomatic relations with Beijing. I do not think that the US would risk a war with China over Taiwan if there was a precarious situation on the Korean peninsula that could really harm the US military stationed there and in Japan and, not only that, it would seriously harm relations between the US and Korea. Economically it would effectively put a stall on US economic relations with Korea and China, limiting the US's involvement in the region to Japan and various countries in various stages of development across SE Asia.
The US could defend Taiwan in this kind of scenario, but at the cost of its military in Korea. I don't think that the US would risk this, and it's not sending out any real message to other allies around the world, as with no diplomatic relations, the US can clearly state that Taiwan was never an ally, as it never was recognised as a country by the US.
I think that in any other situation, the US may defend Taiwan in some way, but not in a situation where it risks a good chunk of its military in Korea and Japan. Consider the following potential scenarios:
1. The US and SK are fighting North Korea in Korean War II, with no Chinese support of North Korea. China begins to invade Taiwan / bombard Taiwan - the US defends Taiwan.
2. The Korean peninsula maintains the status quo, but facing internal dissent / riots, China invades Taiwan to unite the nation - the US defends Taiwan.
3. Taiwan declares independence, gets invaded by China - the US defends Taiwan (provided status quo is maintained in Korea)
This is one of the reasons I think China has shown restraint over Taiwan. The only way it can conceivably pull off an invasion is if it is holding US forces hostage (effectively) in Korea, and it can only do that if the North falls, it has a military presence there and it has got South Korean even more onside (e.g. by promising to help rebuild and modernise the north). I would not be surprised if this is what China has been planning for.