Attorney General William P. Barr asked then-U. S. Attorney Geoffrey Berman if he would consider the job of Securities and Exchange Commission chairman to clear the way for President Donald Trump to install a political ally as the leader of the powerful head of the federal prosecutors’ office in Manhattan.