In Chinese the use of 西 (western) often really means from the West compared to China so India/Central Asia/Middle East, which can be a little confusing at first if you are used to the word meaning "Western World".
For instance, watermelons come from Sudan/Egypt and thus arrived in China from the West long before Europeans visited.
Another example is The Journey to the West (Monkey King) novel which is also about travelling to India.
The recorded English-language etymology for "ketchup" suggests that the word comes from one of the Chinese dialect's word for tomato. Do you have any idea which Chinese word sounds like ketchup?
My personal theory based on nothing more than the vibe of the thing is that it comes from the Malay/Indonesian word ‘kecap’ (which is pronounced almost identically to “ketchup”), the word for sweet soy sauce. This is soy sauce that is thickened and sweetened with palm sugar, and I could see European cooks attempting to replicate it based on the vague descriptions given by sailors, and ending up with ketchup.
Are the Vietnamese and Chinese languages related? Or perhaps one of the two cultures was introduced to that fruit by the other, and thus preserved the name?
Not related at all in recent history and I have no insight on the etymology links but Vietnamese used to be written in a mix of original Vietnamese Chinese-style characters before they changed to a Latin alphabet with Colonialism and Communism so there was definitely contact.