2023 recharacterization: the original amount to the first IRA you report as contribution to the second IRA, earnings move but that is ignored.
You must use a trustee-to-trustee transfer before the due date April 15,2024 ( or Oct 15, 2024 if 1040 was timely filed or extended).
You will instruct trustee to calculate the allocable earnings.
report this on your tax return for the year during which the contribution was made.
Treat the contribution as having been made to the second IRA on the date that it was actually made to the first IRA.
to report a non-deductible contribution, Form 8606 must be attached.
============
2022 return of excess contribution:
after tax due date including extensions: you distribute the excess amount being carried forward on 5329,
(or offset it with currently allowed contribution) .
Amended return(s) will be needed supplying that Form 5329 since there is a 6% penalty per year on accreting excess contributions .
Earnings stay in the Roth account.
Consult your custodian to obtain the correct removal form for each case.