Isabelle invests $A$ dollars in an account paying 8.4 percent simple interest, and $B$ dollars in a account paying 6.9 percent interest compounded annually. After 6 years, the accounts have exactly the same balance. If $A = 5000$ dollars, what is $B$?
$B$ = dollars.