Retirement tax questions

I tried reading through all the information that others have posted, but I still do not understand this section.

 

I am in my second year of IRA  contributions and Roth Conversions:

2021 - Contributed $6,000 to Traditional IRA, Converted $5,979 to Roth IRA (-$21 in losses before conversion)

2022 - Contributed $6,000 to Traditional IRA, Converted $6,000 to Roth IRA

 

Other Contributions Previously taxed by Massachusetts = X

Total Distributions Received in Previous Years = Y

 

Could someone please explain how to get X and Y?  Thank you!

@AmyC