Lawyers for two federal employes' unions resolved their differences yesterday and signed a written agreement with the government that will guarantee government workers reimbursement of their parking fees if a court order which declared the fee program illegal is upheld on appeal.

The agreement gives the government 90 days to calculate how much money is owed to each of about 200,000 employes nationwide who paid more than $20 million in parking fees from November 1979 until last March. U.S. District Judge Harold H. Green declared the program illegal. The agreement was submitted to Green late yesterday for his approval.

The government has notified the U.S. Court of Appeals that it intends to contest Greene's decision, but a hearing on the case is not expected until at least September. While the agreement signed yesterday does provide for restitution if the appeals court upholds Greene's decision, it leaves room for the government to continue to try to delay the reimbursement if it decides to contest the case up to the U.S. Supreme Court.

Green ruled that former President Carter should have submitted the parking plan to the Congress before it was put into effect.

As part of the agreement signed yesterday, the two unions, the American Federation of Government Employees and the National Treasury Employees Union, will both ask the appeals court to give the case quick consideration. The unions also reserved the right to argue later that the employes are owed interest on the money that they paid to the government to park.

When Greene issued his opinion in the case last March, he left open the question of whether the government has to return fees already collected from government workers. Eventually, the government agreed it would make restitution if Greene's ruling is upheld, but attorneys for the two unions were unable to come to terms on an acceptable settlement. Yesterday's proposal was reached after Green warned all sides last week that he would decide the question unless the lawyers resolved their differences.

Included with the agreement yesterday was a claim form that will be made available to government employes at their agencies so they can state how much money they paid in parking fees. The government said it will publicize the agreement in government newsletters, on bulletin boards and in agency cafeterias. Claim forms will also be available at government parking lots and from the office of the transportation coordinator at the General Services Administration.

The notice also makes it clear that if the government succeeds in getting Greene's decision reversed, the employes may be required to pay back fees from March 3, when Greene blocked any further collection of money.