Sidney Harman, the founder of Harman International Industries Inc., agreed to buy Newsweek magazine from Washington Post Co., ending a three-month bidding process for the money-losing publication.