The 14 white firefighter-trainees dismissed last week to make room for a group of unemployed, mainly minority trainees in the Prince George's County Fire Department will get to keep their jobs after all.

Several days of delicate negotiations involving the men, their lawyer, union officials, the county attorney and County Executive Winfield M. Kelly Jr. ended late yesterday with an agreement that enough funds are available to hire both groups.

Both Kelly and Martin Rouse Jr., head of Local 1919 of the Firefighters Union, described the agreement as an "equitable solution" for all concerned. "Our main objective was achieved," said Al Ross, 22, one of the 14 men.

It was County Executive Kelly who last week ordered the 14 trainess dropped after it was discovered that, through what he termed an "administrative error," the current cadet class of 22 firefighters contained no blacks and no persons from a federally funded program to hire the unemployed. The county has used the socalled CETA program, the acronym for the Comprehensive Employment Training Act, to increase its percentage of minority workers.

After what Kelly aide John Lally described yesterday as "a painful process for both the county executive as well as the individuals," it was decided that the 14 white trainees could also qualify for CETA employment.

The original group of 22 cadets had been hired from a long waiting list based on merit, and many had given up other jobs and moved in order to become Prince George's firefighters.

Kelly's initial solution last week was to permit the top eight of the 22 trainees to remain and to offer the other 14 men jobs as guards in the county jail. The group rejected that offer unanimously.

Kelly initially planned to reconstitute the training class with the eight men chosen from the merit list, plus seven new cadets to be paid with CETA money. He also planned to put on the regular county payroll eight firefighters who had already been trained but were still on the CETA payroll.

Under the solution agreed to yesterday, the 14 men who were dismissed last week will continue their training and be paid with CETA funds with a written promise to become countpaid firefighters in six to 18 months.

The cadet class will also take on five new CETA workers, who will also receive assurances of eventual regular jobs, and seven already-trained CETA employees will also go on the regular county payroll.

"We're happy a solution has been arrived at that gets these 14 guys back to work," said joseph McBride, their attorney.

"We're not all 100 percent pleased," said James Alfred, one of the 14 men, "but we will return as firefighters." "We're still working for the county," added Ross, his classmate. "The funding is just coming from a different place."

Through CETA grants, the proportion of uniformed black firemen in Prince George's County has risen in less than two years from 4 to 9 percent of a total 344 firefighters.

"The CETA program is not just in the department and this is not an issue of affirmative action by any stretch of the imagination," Kelly said yesterday.

After Kelly's initial action, the 14 men filed suit last week charging "reverse discrimination" by the county government.

Under Kelly's administration, the county has sought to bring more blacksinto local government to more accurately reflect the changing racial demographics of Prince George's.