Trump threatened to impose tariffs on products from Canada and Mexico if they don’t stop what he called the flow of drugs and migrants across their U.S. borders.