Audited by NC 2023 from my error

I filed my taxes electronically using TurboTax desktop for the past few years.   I'm retired from federal service and qualify for the Bailey Settlement in NC making me exempt from paying NC State tax on my CSRS annuity.   My wife retired from federal service in 2019 and I thought she qualified too.  We were audited by NC state DOR in 2023 going back 3 years from when my wife retired and I discovered that she was not eligible under Bailey.   She withdrew a sizable portion of her FERS annuity in 2019 and again in 2021.  We wound up paying NC close to $60,000 last year for 2019 - 2022.  I don't have anything from the state explaining the calculations and the determinations and I am confused about how much I can claim on this year's federal return.   Can I claim prior years or can I claim the lump sum we were charged in 2023?  And if so,  where is this entered?  I'm just about ready to throw in the towel and go pay H&R Block to do my taxes.   Can anyone help me with this?