How to report a return of excess Roth IRA contribution for 2021 and 2022

Hello, I have the following situation, and was wondering how I should go about handling/reporting everything in TurboTax.

 

1. Made an excess Roth IRA contribution in 2021 for $6000 - this was originally not reported correctly as excess contributions.

2. Made an excess Roth IRA contribution in 2022 for $6000 - this was originally not reported correctly as excess contributions.

3. Made an excess Roth IRA contribution in 2023 for $500

 

In late 2023, I withdrew all of excess contributions and earnings. I got two 1099-Rs this year for the withdrawal:

 

1. Gross distribution of $12495.06 ($6000 + $6000 + $495.06 in gains); taxable amount blank; distribution code J

2. Gross distribution of $548.95 ($500 + $48.95 in gains); taxable amount $48.95; distribution code 8J

 

I have already filed an amended return for 2021 while paying the penalty on the $6000 excess contributions. I have not yet filed an amended return for 2022 for the $6000 excess contributions for that year.

 

My understanding is that:

 

1. The total amount of gains withdrawn in 2023 ($495.06 + $48.95) should count towards my taxable income of 2023, and I would be subject to a 10% early withdrawal penalty on this amount.

2. I need to file an amended return for 2022 paying the 6% penalty on the excess contribution.

3. The $12,000 -return of excess contribution- is NOT subject to any additional taxation and penalties for 2023.

 

Is this correct? What are the correct/simplest order of operations here? Should I file an amended 2022 return first before proceeding with 2023 returns? How should I go about entering all this in the software for tax year 2023?

 

Appreciate any guidance here!