HP also issued a preliminary report Wednesday for the three months that ended in October, saying it earned 99 cents per share, compared with 84 cents in the year-ago period.
After adjusting for restructuring and other one-time items, HP said it earned $1.14 per share. Revenue fell 8 percent from the same period a year ago, to $30.8 billion. By both measures, HP did better than Wall Street was expecting, according to a Thomson Reuters poll.
HP is the world's largest computer maker and the economic downturn has been a drag on two of its core businesses, PCs and printer ink. The 3Com acquisition is the latest move by HP to branch out into other areas. Last year, the company bought Electronic Data Systems Corp., making its high-margin technology services group its biggest revenue and profit generator.
The 3Com products will be folded into HP's own networking equipment business. HP said the deal will add new products to its line and help expand its presence in China.
HP also said in a statement that customers want more than one vendor in a sector dominated by Cisco Systems Inc.
The company said it will give 3Com stockholders $7.90 per share. Both HP's and 3Com's boards have approved the deal, which HP expects will close in the first half of 2010.
3Com is based in Marlborough, Mass. In the most recent quarter, it had $290.5 million in revenue.
Shares of HP were unchanged in extended trading. Earlier, the stock added 4 cents to close at $50. 3Com's stock slipped 7 cents in after-hours trading, after finishing the regular session up 28 cents, or 5.2 percent, at $5.69.