You've got to hand it to Comcast (NASDAQ:CMCSA). The cable giant certainly knows how to do deals.

Last week, Comcast inked a winning deal that gives it access to Sony (NYSE:SNE) and MGM (NYSE:MGM) movie libraries. This week, Comcast entered an alliance with Time Warner (NYSE:TWX) that creates a cheaper way of buying the prized assets of bankrupt Adelphia Cable Systems that are now on the auction block.

You'll recall that back in 2002 Adelphia collapsed in the wake of the accounting scandal led by the founding Rigas family. Well, that bankruptcy leaves 5.2 million subscribers and coveted franchises in upmarket territories, including Los Angeles and Palm Beach, Fla., up for grabs. Analysts reckon that the company's parts could sell for as much as $21 billion or $3,500 per subscriber in a competitive auction to be held before the end of the year.

By teaming up with Motley Fool Stock Advisor recommendation Time Warner, Comcast in a single stroke removes its biggest competitor from the bidding. Instead of bidding against Time Warner plus a bunch of eager cable industry players, Comcast dramatically lowers the risk of overbidding for assets that can be happily carved up with Time Warner.

Even better, a joint purchase will help Time Warner buy back all of Comcast's 21% stake in Time Warner's cable business. The entertainment giant doesn't want Comcast to sell the entire 21% to anybody else. If Time Warner gets Adelphia's systems, it has an elegant tax-free solution that could give Comcast what it wants for the 21% stake. In a prelude to a deal, Time Warner has already agreed to give Comcast 90,000 subscribers and $750 million in cash in exchange for 4% of the stake.

Comcast is showing to investors that it still hasn't lost its knack for deals, even after its failed takeover bid for Disney (NYSE:DIS) earlier this year that shook investors and left its shares in the dumps. Working with Time Warner, Comcast has a chance to grab prime assets without getting drawn into the trap of overpaying. In the passion-ridden and risky world of Wall Street mergers and acquisitions, that kind of deal should be applauded.

Fool contributor Ben McClure hails from the Great White North. Ben doesn't own any shares mentioned here.