British publisher Robert Maxwell, as expected, has agreed to buy for an undisclosed sum the Thomas Cook Travel Inc. USA group of travel agencies from Dun & Bradstreet Corp. Dun & Bradstreet granted Maxwell an option to buy Cook when it sold Oak Brook-based Official Airline Guides to him last year.