A federal judge has ruled that Metro improperly tried to remove 300 office workers from a union bargaining unit and has ordered the transit agency to give 14 percent cost-of-living raises to 200 other employes represented by the union.

The retroactive raises would cost about $400,000, according to Metro officials, who declined further comment on the ruling by U.S. District Judge Barrington D. Parker.

Tuesday's decision grew from a dispute with the Office and Professional Employees International Union, which first sought to represent office workers at Metro in 1979.

The dispute centered on Metro's contention that 300 of 500 employes placed under union jurisdiction in 1980 were managers, supervisors or "confidential" employes who should not be represented by the union.

Metro granted the 300 disputed employes 7.7 percent cost-of-living raises in 1980, and 6.12 percent last month.

The 200 employes that Metro recognized as covered by the union did not get raises, on the grounds that their wages were subject to collective bargaining. Contract talks were broken off late in 1981, pending a court ruling of the jurisdiction dispute.

Judge Parker on Tuesday ordered Metro to abide by the arbitration ruling that put all 500 employes under the union's jurisdiction, and to pay the two cost-of-living increases retroactively to the 200 employes who did not get them. Other issues in the dispute remain under court consideration.