Re-characterizing Roth IRA funds multiple times
I overcontributed to my Roth IRA in 2022 due to an unexpected income change. The amount I wanted to transfer to my regular IRA was the overcontribution adjusted for profits and value changes, etc. Let's call this X. I sold some shares in the Roth IRA to have $X to transfer over to my 2022 IRA. However, I accidentally contributed $X to my 2023 IRA. My question is, is it possible to recharacterize the contributions from my 2023 to 2022 IRA? If so, what are the tax implications. Thanks in advance for any help!
Side Note: I also have $Y overcontributed to my 2023 Roth IRA (since I will no longer be eligible to contribute) and need to recharacterize that. Can I also recharacterize those 2023 contributions to my 2022 IRA limit?
Side Side Note: I did search for information about this online and was confused, and reddit search got me nowhere.
Edit: Fixed mistake