IRA

My wife passed away in 2023 and did not have me listed as the beneficiary of an IRA. I contacted the attorney who completed our Will and he advised that it would have to go into her estate and it will cost $3000 to have it transferred to me. I paid the fee out of after tax funds. I understand that I can deduct that cost from the proceeds of the IRA. Now that I have the funds in my account, how would I withdraw the $3000 and not pay taxes on it?