The foreman on the Annandale construction site where a trench cave-in took the lives of two young workers two years ago yesterday disputed a federal investigator's account of the accident.

Foreman Larry Cosaro placed the cave-in nearly 100 feet away from the location given by Labor Department inspector Edward Allen, a discrepancy that could throw into question soil analyses expected to be offered as critical government evidence in the case.

Federal prosecutors are seeking the conviction of two Northern Virginia construction company officials in what they say is an intitial effort to crack down on alleged safety violations in the building industry in the rapidly growing Virginia suburbs.

The two top officers of the S.O. Jennings Corstruction Corp., S. O. Jennings and his son, Bruce Jennings, are being tried in Alexandria's U.S. District Court on three charges of violating federal safety regulations in connection with the deaths of Robert Baker and Michael DeGroot July 18, 1978.

The Jennings pleaded innocent to charges of "willfully and unlawfully" failing to take proper safety precautions while Baker and DeGroot were laying sewer pipe in a trench between 17 and 19 feet deep.

In an interview yesterday, Occupational Safety and Health Administration (OSHA) inspector Allen said the government plans to introduce analyses of soil samples taken from the cave-in site after the accident in an effort to show that the trench was improperly sloped.

The usefulness of that data could be jeopardized, however, if there is a dispute over where the cave-in took place.

Baker and DeGroot were killed when a long section of the trench in which they were working collapsed and buried them. Allen said that soil analyses of the area show that the banks of the trench were too steep to be safe.

But Cosaro, who was directing the construction at the time, also disputed Allen's measurements of the trench, which would indicate how the ditch had been sloped.

He cast further confusion over the accident's location by testifying that he regularly falsified his own progress reports, which might otherwise show how much pipe had been laid up to the day of the cave-in.

Pressed by Judge D. Dortch Warriner as to why he "pretended" that he sometimes reported doing more or less work than he actually performed, Cosaro said "all the other foremen did it" and "I guess it made me look good."

In his testimony yesterday, Cosaro confirmed that company officials had been concerned the week before the accident that the area in which they were working was to narrow to dig the trench.

He said officers of S.O. Jennings and the general contractor for the subdivision where the sewer line was being laid discussed the use of a "trench box" -- a protective device for workers in the trench -- in the face of a narrow construction easement.

Cosaro said he had also discussed the problems connected with the narrow easement with S. O. Jennings. "When I started digging," Cosaro told the judge, "I realized it wasn't enough room."

He said work on the trench stopped the day before the accident until more easement could be acquired and some trees cleared away to make room for excavated materials.

N the three counts returned by a federal grand jury last month, the company and its officers are accused of failing to brace the sides of the trench and of piling tons of excavated dirt too near the edge.

If convicted, S. O. Jennings and Bruce Jennings could be sentenced to six months in prison and fined $10,000 and each count. The company faces more than $24,000 in additional OSHA fines.