The remaining balances in the first and second account are $5805 and $1020 respectively.
Explanation
Suppose, the initial balance in the first account was  [tex]x[/tex] dollar.
As the total amount in two accounts was $9000, so the initial balance in the second account was  [tex](9000-x) dollar[/tex]
He withdrew 10% from the first and 60% from the second account to buy the ring which cost $2175. So, the equation will be......
[tex]0.10x+0.60(9000-x)=2175\\ \\ 0.10x+5400-0.60x=2175\\ \\ -0.50x= 2175-5400= -3225\\ \\ x=\frac{-3225}{-0.50}= 6450[/tex]
So, the initial balance in the first account was $6450 and in the second account was ($9000 - $6450)= $2550
Thus, the remaining balance in the first account = 90% of $6450 = [tex](0.90*6450)= \$5805[/tex]
and the remaining balance in the second account = 40% of $2550 = [tex](0.40*2550)=\$1020[/tex]