WASHINGTON — The German carmaker Daimler has agreed to pay about $185 million in fines, and two of its subsidiaries will plead guilty to bribing foreign government officials, to settle a multiyear corruption investigation, according to a person familiar with the case. Daimler, the maker of Mercedes-Benz and Smart brand cars, cooperated with the investigation and will avoid indictment, said the person, who spoke on condition of anonymity because the details of the agreement had not yet been made public. A hearing in the case is scheduled for April 1 before Judge Richard J. Leon of United States District Court in Washington. On Tuesday, the Justice Department released criminal complaints against Daimler and three subsidiaries. One accused Daimler of bribing foreign officials in at least 22 countries, including Russia and China, between 1998 and 2008.