CarMax Inc., the largest used car dealer in the United States, has agreed to pay $15,000 to each of dozens of military members after federal officials said the company illegally repossessed vehicles.