HINTS
[more hints added, assuming downvote means my first attempt does not make it easy enough]
I am assuming that A's die is 1-12 and B's is 1-20 (not stated in the question as I write this).
An elementary point to get started. If your die has 12 sides, you have a half-chance of getting 1-6. So you might think it was best to reroll iff you got that. If you follow that strategy, you have a half chance of getting 7-12 on the first roll, and a half chance of rerolling. So you have $\frac{1}{24}$ for each of 1-6, and $\frac{3}{24}$ for each of 7-12, expected value 8.
Now consider B's strategy. If B gets 13 or better he is certain to win. If he leaves a 9 he expects to win 50% of the time. So suppose he rolls a 10 (which if he followed the analogous strategy to A would mean a reroll). It is easy to check that A's chance of leaving a 10 or better (on her assumed strategy) is $\frac{9}{24}$. In other words, if B does not reroll, he expects to win $\frac{15}{24}$ of the time. So should he reroll? It is easy to check that he should not.
But how do we avoid a kind of infinite regress? How can either A or B decide whether to make a second roll without knowing the other's strategy? Do we need some kind of minimax approach?
Note the asymmetry. With a single roll, the game would clearly favour B.