North Korea and North Vietnam were both (and NK still is) communist nations, while their southern counterparts were both capitalist and aligned to western influence. Why is this exactly? My thinking is that North Korea shares a large border with both China and the former USSR, so they would have easily shared aid and influence via that border. Although it doesn't make much sense with Vietnam because to my understanding China and the USSR agreed that the Soviets would support the North Vietnamese, so militarily it wouldn't make sense, but sharing a border with China would be more beneficial to them than no border at all.
You realized this: "North Korea shares a large border with both China and the former USSR, so they would have easily shared aid and influence via that border."
but couldn't realize this: "China and the USSR agreed that the Soviets would support the North Vietnamese" is actually Communist Propaganda, to make it look like the USA was bullying North Vietnam.
Now I'll tell you this: At the peak of the war, each day, everyday, the Chinese spent 20 million U$ aiding North Vietnam. And that didn't count Soviet aid. It's somewhat similar to Putin's Russia and Ukraine, as Putin said:"It's all nonsense, there are no Russian units, special forces or instructors in the east of Ukraine." But this time everyone has Ipad and Iphone to take photos. In Vietnam before American troops withdrew the Vietcong and NVA had carefully hunted and attacked foreign journalists, to scare them off from their operation zone. Since Chinese aid to Hanoi was enormous, as even at the height of the Chinese Famin which killed as much as 30 million Chinese Mao was still sending "food aid" to North Korea and North Vietnam, China had expected a well-behave ally in return for that "emotional debt." And Hanoi screwed it up by attacking China's ally Cambodia, which started the Chinese invasion of 1979. Deng Xiaoping's goal was to destroyed the Chinese built infrastructure in the Northernmost provinces.
Edit: fixed the number, adding one zero. 20 million U$ not 2 million U$. Number is from former Vietnam's ambassador to China. To the ones who downvoted me, 20 million a day, 7.3 billion a year, let's say China had fully helped Hanoi for ten years and the number would be only 73 billion U$.