An emboldened Mexico hardened its opposition to President Donald Trump on Friday by saying it would retaliate if the United States imposed a border tax and that it can afford to lose financial aid that might be pulled to pay for a border wall.