If they use the dollars to buy stuff from China or Europe, they have to exchange the dollars into Yuan or Euros. That puts downward preassure on the dollar in the FX markets, which ultimatley results in inflation here.
The only way newly printed money going to Mexico wouldn't cause inflation here would be if Mexico's economy were totally closed and they were using dollars as a subsitute for Pesos. Of course, Mexico's economy is no closed.
Well --- I know the giant give-away to Mexico is one way to keep inflation down --- imagine if all those billions leaving --- to the drug cartels and to prop up nonworking families in Mexico --- instead stayed in the USA? It's like the billions of federal handouts going to the areas of high immigration to prop up the schools and hospitals and free medical clinics. The money is pouring from affluent areas of the USA into the poverty-stricken areas and then out to Mexico --- where they just kind of lose their value due to high inflation and lack of incentive to invest and build up anything.