In the first quarter of 2022, Warren Buffett's firm, Berkshire Hathaway (BRK.A -0.34%) (BRK.B -0.01%), plunked down $4.2 billion for 121 million shares of personal computer and printer maker HP (HPQ -0.11%). Shares of HP jumped as the news broke that Buffett took a position in the company. Before that, though, the stock had gained an underwhelming 50% since October 2009. What did Buffett see in the company that no one else saw?

What does Buffett see in HP?

Even the novice Buffett disciple can tell you that Buffett loves companies that generate tons of cash flow. HP checks that box. In its 2021 fiscal year ended Oct. 31, 2021, HP generated free cash flow of $5.8 billion and had a market cap of about  $35 billion. That means the stock had a free cash flow yield of 16.6% -- not too shabby!

Buffett is also a huge proponent of valuation. He likes to buy the stocks of companies that trade at low P/E ratios, like HP. During the fourth quarter of 2021, HP's P/E ratio slumped to the mid-single digits. To put the P/E ratio in perspective, since 1935, the average P/E ratio of S&P 500 stocks has been 15.5. Buffett was able to pick up shares at an attractive valuation compared to historical valuations.

Person in a video meeting with coworkers.

Image source: Getty Images.

The PC business is cyclical; folks use the computers for a few years before trading them in, and new models are introduced. The COVID-19 pandemic introduced another cycle that hit the PC industry. Throughout 2020 and 2021, employees adjusted to a new work-from-home environment, which led to a banner year for PC makers. In 2021, HP had its highest revenue since 2014. Buffett could be anticipating that the work-from-home or hybrid workforce will be permanent.

HP also believes the hybrid trend will continue. Just after the first quarter, the company announced that it had acquired Poly, a leading audio and video conferencing provider. In a presentation to investors, management said that combining HP's personal computers and Poly's conferencing equipment would increase the workforce solutions market penetration. They also noted that the total addressable market for workforce solutions is growing at an 8% compound annual growth rate and is expected to reach $120 billion by 2024.

Companies repositioning their workforce and office space may be inclined to do business with the combined company. For instance, a company sourcing its laptops, headsets, videoconferencing screens, and software from separate vendors would much rather go with HP because they can outfit everything from a single vendor with experience in every aspect of an evolving workforce.

Is HP stock a buy right now?

Some investors are worried about a slowdown in PC sales, considering its massive growth in 2020 and 2021. To a point, that might be true, but if a hybrid workforce is here to stay, the market might be bigger than it has in the past. In addition, HP's acquisition of Poly puts it in a fantastic position to compete in the growing workforce solutions market.

I'll conclude with one last tenet from the Buffett handbook. The legendary investor loves companies that are committed to buying back their shares. Since 2012, HP has used $31.4 billion of its free cash flow to repurchase shares. Over that time, HP has reduced its share count by 43%, from almost 2 billion shares to 1.1 billion. If you see the same value and growth prospects in HP as Buffett, the shares should be on your radar.