I live in California. I have 3 accounts - Trading, Traditional IRA and Roth IRA. I moved $6000 (IRA limit) from my Trading account to Traditional IRA, and then I intended to move this amount to Roth IRA, i.e. simple backdoor Roth IRA that I do any year I have money. However I seem to have made a mistake and this amount from traditional IRA back to my Trading account instead of the Roth IRA account. Now I can no longer make an IRA contribution as the account says that I have already done it for the last year. Did I just lose this amount in terms of moving it to my Roth IRA? Will I still have to pay taxes on it?
You can use the "indirect rollover" process to move the amount into the Roth IRA as you intended, as long as you do it within 60 days of the withdrawal. You can only do one indirect rollover per year.
In Publication 590-A, section What if You Contribute Too Much?, it says,
Withdrawal of excess contributions.
For purposes of determining excess contributions, any contribution that is withdrawn on or before the due date (including extensions) for filing your tax return for the year is treated as an amount not contributed. This treatment only applies if any earnings on the contributions are also withdrawn. The earnings are considered earned and received in the year the excess contribution was made.
So I think that means that if you contribute another $6000 to your Traditional IRA, that would be a total of $12000 of contributions, but since you withdrew $6000 (plus earnings) before the due date of your tax return, that $6000 does not count in your contributions, so you would not have an excess contribution.