The joke among coal miners and their union leaders goes something like this:

"How long have you been mining, kid?" an old-timer asked.

"Two months," the young miner replied.

"You applied for black-lung benefits yet?"

"Hell, no! It takes 25 years to get that disease."

"Yeah, and if you apply now, you might get the government to approve your claim at about the same time you get sick."

It points up the problems that the Labor Department has had in resolving claims for black-lung benefits in a speedy fashion.

As of Sept. 30, according to a recent General Accounting Office report, 20,450 black-lung cases were pending before the Labor Department's Office of Administrative Law Judges, the first appellate panel to review disputed claims. Another 5,234 cases were pending before the department's Benefits Review Board, the last appellate level before the federal courts.

"Given fiscal year 1984 staffing levels," the GAO concluded, "it will take the department over 35 years to reduce its backlog of black-lung cases to levels considered reasonable (6,000 cases per year) and decisions on cases could take, on the average, more than three years through the mid-1990s."

Aides to Rep. Donald J. Pease (D-Ohio), who requested the GAO study, say coal miners in his district would be pleased if they thought their cases would be heard in only three years. Several, the aides said, have been waiting for four or five years for a decision.

An estimated 10 percent of the nation's active coal miners and 20 percent of retired coal miners suffer from black lung or pneumoconiosis, caused by inhaling coal dust over a long period. The disease makes breathing difficult and usually leads to death at an early age.

The government has been paying benefits to coal miners who suffer from black lung or to their survivors since 1969 when Congress, under pressure from the United Mine Workers, passed the most comprehensive mine safety and health law in U.S. history.

At the time, the program's supporters claimed that black-lung benefits would cost the government $150 million to $300 million a year over a four-year period. By 1973, they predicted, the program would not cost the government a cent because it would be turned over to the states and financed through state worker-compensation programs.

That transfer never occurred, however, because by late 1972, none of the state programs had met federal standards.

Congress voted to liberalize the program in 1978, after the UMW complained that the government had set such strict rules for awarding beneifts that few miners could qualify. At the same time, it transferred responsibility for the program from the Social Security Administration to Labor's Office of Workers' Compensation Programs.

Congress also took a step to which the GAO now points as the main cause of the case logjam. It ordered Labor to review all claims that the Social Security Administration had rejected in light of the new criteria.

"The theory was that we were changing the rules in midstream," recalled Washington attorney Michael L. Goldberg, who served as chief counsel of the Senate Labor and Human Resources Committee in 1978. "It was like giving everyone another bite at the apple."

Congress also made another significant change by transferring the program's cost from the government to coal producers. The Labor Department was ordered to identify the coal operators "responsible" for each claim and make them pay the benefits. The operators were allowed to set up tax-exempt insurance funds to cover their losses and were told they could appeal cases if they did not believe they were responsible.

If a "responsible" operator could not be found, benefits would be paid from a special Black Lung Disability Trust Fund. The fund is now supported by a federal excise tax of $1 per ton of underground-mined coal sold and 50 cents a ton on surface-mined coal.

The new rules caused a surge of appeals from miners who previously had been denied claims. Coal operators also responded by appealing decisions that had named them as responsible for a miner's disease.

Before 1979, the department had 1,000 appeals pending at its two appeals levels. By 1982, there were 15,000 cases awaiting action.

The cost of administering the program also boomed, the GAO said, reaching $631 million in fiscal 1984. Although that was supposed to be paid by the trust fund, it has operated at a deficit since it was created and has had to borrow $2.1 billion from the Treasury.

Part of the reason the fund is in debt, the GAO said, is that in some cases, it pays interim benefits to miners if operators appeal a verdict that went in the miner's favor. Operators are required to refund the money with interest, but only after a decision is rendered.

In September, Congress passed legislation to let the Labor Department expand the Benefit Review Board from three to five members and add four temporary members. The Office of Administrative Law Judges also is using retired judges to reduce the backlog.

With an expanded board, the GAO estimated, the Labor Department should be able to reduce the backlog to about 800 cases in 12 years; by October 1987, the GAO estimated, Labor should be able to resolve a case in an average of 1 1/2 years.