Roth IRA Rollover 60 day rule

I initially had my money (10,000) invested in a Roth IRA in Bank A. I found that Bank B had better investment options. Instead of doing a direct rollover of the Roth IRA, I mistakenly withdrew the Roth IRA from Bank A.

I deposited 5000 into Bank B a week later. I then deposited the last 5000 another week later also into Bank B Roth IRA. This was all in the same 60 days and with the same money but I deposited with two checks. Is this okay to do? Or will I have to pay taxes? Is there a way to waive if I do have to pay taxes?