The city of Boston will pay a total of $150,000 to two Black men who were wrongly accused in the 1989 killing of a pregnant white woman, officials said on Tuesday. The settlement was announced nearly two years after the mayor, Michelle Wu, apologized for the actions of police and the city, which upended the lives of the two men and exacerbated racial turmoil in the city. The men, Willie Bennett and Alan Swanson, were never charged in the death of Carol Stuart, a 30-year-old pregnant woman who, as it turned out, had been shot by her husband, Charles Stuart, as part of a staged robbery.Mr. Bennett, who is in his 70s, will receive $100,000, and Mr. Swanson, who is in his mid-60s, will get $50,000, according to settlement documents provided by the city. When asked about the settlement at an unrelated event on Tuesday, Ms. Wu said that the men and their families had agreed to withdraw a lawsuit as part of the settlement agreement.