Anybody can make money for people by putting them into a good investment at a low price. The real trick is to get out alive if you put people into a bad investment at a high price -- a trick that J. Bruce Llewellyn has carried off by finding someone to rescue his unfortunate purchase of a Buffalo television station at what turned out to be an excessive price.

In a deal that borders on the miraculous, Llewellyn has managed to get Prudential Insurance Co. to pay his group 120 percent of what they invested in the station -- and to leave them with 55 percent ownership to boot. This despite the fact that the station hadn't come close to making enough money to pay its interest bills since the day Llewellyn bought it.

In fact, it's fair to say that Llewellyn, a New York-based dealmaker, has made the greatest escape seen in Buffalo since the Amazing Randi was stuck into a straitjacket, suspended by a crane over Niagara Falls, and emerged to tell the tale.

Having to fix a problem isn't what anybody had in mind in January 1986, when Llewellyn and his investors bought WKBW from Capital Cities Communications for $65 million. The investors included household names like O.J. Simpson, Julius Erving and Bill Cosby. Not to mention money from Goldman Sachs & Co., which sold $55 million in junk bonds to help Llewellyn's company, Queen City Broadcasting, buy the station.

Cap Cities could avoid capital gains tax on the sale by selling to Queen City because Llewellyn and most of his investors are black. Sales of media properties to certain minorities qualify for special treatment. This is a silly policy, which -- as Howard Rudnitsky pointed out in an excellent Forbes magazine article last year -- enriches wealthy white-run media companies and already-rich members of minority groups. But it's the law.

Selling the Buffalo television station to Llewellyn and a New Haven, Conn., TV station to a group of Aleutian Indians, both at below-market prices, made Cap Cities look socially conscious. Cap Cities could have gotten the same tax break for Buffalo -- but not the same good public relations -- by saying that it had been forced to sell by the Federal Communications Commission's cross-ownership rule. Warren Buffett's Berkshire Hathaway Corp., which had just become Cap Cities's biggest stockholder, owns the Buffalo News, and the rules required that Cap Cities sell the station or Buffett sell the paper.

So Cap Cities sold to Llewellyn for a "bargain" $65 million, even taking $10 million of it in a note that required no cash payments until 1992.

But even with this break, the station didn't generate enough cash to pay the cash part of its interest bill. The reason: Cash flow didn't grow as Llewellyn projected. In fact, it barely grew at all.

The station paid its bills by borrowing, and by tapping the $10 million in cash that Llewellyn and his group had paid to buy their stock. By mid-1989, with TV station prices starting to come down, Llewellyn's investors were in big trouble.

What's more, the day of reckoning on the Cap Cities note is drawing near. The note, which will have a face value of $18.4 million, will carry a cash interest tab of $2 million or $2.5 million in 1992, depending on how you read the fine print. Cap Cities/ABC wouldn't say what the interest rate is. "It's a private matter. We have no interest in discussing it," a spokesman said. A nice attitude for a company in the news business.

Llewellyn, who's a financial guy -- you don't see him running the TV station or his Coke bottler in Philadelphia or the former New York Times Co. cable TV operation -- saved everyone by finding Prudential. How he did it, I don't know, and he wouldn't tell me. All Prudential would say is, "We did this to make money."

Prudential forked over $13 million for 45 percent of the station, of which $12 million went to Llewellyn's investors, who continue to own the partnership that owns 55 percent of the station. When you add Prudential's 45 percent and the pieces owned by Llewellyn's white investors, it's reasonably clear that non-minorities own more than half the station. But the company is still considered a minority enterprise because Llewellyn controls the entity that owns 55 percent.

Llewellyn says that all his investors except Bill Cosby took Prudential's money. "He would have had tax problems in his retirement plan" by cashing out his 2 percent interest, Llewellyn said.

In a wonderful irony, Prudential seems to have belatedly realized that the station owed too much money to be successful. So the Pru cleverly agreed to lend the station money at 11.75 percent to buy back the 13.5 percent Goldman Sachs junk bonds at 20 percent or so below face value. The bondholders are happy to get out of a risky, illiquid investment, even at a loss. The bondholders' loss, of course, is Prudential's and Llewellyn's gain.

This stands normal investment rules on their heads. When an investment goes bad, bondholders are supposed to be paid first, with stockholders taking the loss. Here, stockholders made a profit and the bondholders take a loss.

The station still isn't out of the woods, though. If both Cap Cities and Prudential actually insist on getting paid interest on their loans, rather than pulling some face-saving stunt, the station won't be able to cover its 1992 interest payments unless its cash flow goes up substantially.

But that's 1992's problem. And, probably, Prudential's. Llewellyn has gotten his investors out alive, which is a pretty neat trick under the circumstances. Take a bow, Bruce.

Allan Sloan is a columnist for Newsday in New York.