Two black construction executives were acting as a front for a white-owned firm when they obtained a $2.4 million federal contract set aside for minority businesses, federal prosecutors said today as the executives went on trial on U.S. District Court here.

However, defense attorneys said that the white-owned firm, Excavation Construction Inc., was closely involved with the work of the minority firm only because its employes were trying to help two former colleagues wade through a mass of financing, bonding and equipment problems.

Raymond L. Rice, 42, and Jesse G. Williams, 44, both of Calvert County, are being tried on charges of defrauding the federal government and making false statements in connection with their ownership of R&W Construction Co. Inc. of Washington.

R&W, which was incorporated in 1972, has done major amounts of work on the Washington Metro on subcontracts awarded to minority businesses.

The trial revolves around a $2.4 million project to shore up land at the U.S. Naval Academy in Annapolis in 1976.

Assistant U.S. Attorney Robert A. Rohrbaugh said R&W, which won the contract, subcontracted "in excess of $800,000" to Excavation Construction and handed Excavation another $144.000 for a management-technical assistance contract on the project.

Rohrbaugh outlined a series of connections between two officers for Excavation Construction and R&W and said it was only through the "personal guarantee" of John Lyon and Larry Campbell that R&W secured loans, construction bonding and equipment. R&W was also listed on Excavation's insurance policy as an "affiliate," Rohrbaugh added.

Defense attorneys Courtland K. Townsend Jr. and A. J. D. Schmidt said Excavation's assistance, which the government says amounted to "hidden ownership," was common practice in the construction industry. Such activities were "done all the time," they said.

The trial, which is expected to last about two weeks, began yesterday with the selection of an eight-woman, four-man jury. One of the panel's members, the jury foreman, is black.