Destro, you are conflating events that happened years apart. The conflict between China and Vietnam, and the overthrow of the Khmer Rouge, happened in 1979, 4 years after the collapse of South Vietnam and the simultaneous collapse of the US backed Cambodian government of Marshal Lon Nol (of whom few Americans have ever heard), and 6 years after the treaty that ended US involvement in the war.
The US did not back the Khmer Rouge in the Indochina War, we fought tooth and clawnail against them from 1970 to 1973. They campaigned against Lon Nol’s Cambodian government just as the North Vietnamese campaigned against the government of South Vietnam. While Americans were there, the Khmer Rouge and the North Vietnamese were allies, cooperating closely to protect the NVA sanctuaries in Cambodia. The Lon Nol government had come to power in the first place in an effort by Cambodians to eliminate the sanctuaries and end the foreign occupation of eastern Cambodia by the Vietnamese. In order to do this, Lon Nol had overthrown none other than Prince Norodom Sihanouk, future Khmer Rouge ally, who had encouraged and tolerated the sanctuaries since the 50s. This is the truth that is obscured by self-serving media and politicians to the present day. The facts themselves are not in doubt but they are widely ignored.