Mexico is working with the United States to reach an agreement on tariffs before an impending deadline, a senior Mexican government official said on Wednesday, and the U.S. recognized its work to control migration and fentanyl trafficking.