SAN FRANCISCO (MarketWatch) - Hewlett-Packard Co. HPQ, +0.37% on Wednesday said it has agreed to buy Palm Inc. PALM, +6.55% in a $1.2 billion deal. H-P said Palm shareholders will receive $5.70 in cash for each share of Palm common stock. H-P said the boards of both companies have approved the transaction.