There seems to be an implicit assumption in the question that a priori either coin is equally likely to be the fair coin; without any assumptions about the a priori distribution the desired probabilities are not well-defined.
The probability for the result described if A is the fair coin is $\frac12\cdot3\cdot\frac23\cdot\frac23\cdot\frac13=\frac29$, whereas if B is the fair coin it's $\frac23\cdot3\cdot\frac12\cdot\frac12\cdot\frac12=\frac14$. Thus if both are a priori equally likely to be the fair coin, the probability for B to be fair is $\frac14/(\frac14+\frac29)=1/(1+\frac89)=\frac9{17}$.
If you flip A again, the result will be heads with probability $\frac8{17}\cdot\frac12+\frac9{17}\frac23=\frac{10}{17}$ and thus tails with probability $\frac7{17}$. If it's heads, the probabilities for the result obtained will be $\frac12\cdot3\cdot\frac23\cdot\frac23\cdot\frac13\cdot\frac12=\frac19$ if A is the fair coin and $\frac23\cdot3\cdot\frac12\cdot\frac12\cdot\frac12\cdot\frac23=\frac16$ if B is the fair coin, so you would guess that B is the fair coin and would be right with probability $\frac16/(\frac16+\frac19)=\frac35$. If it's tails, the probabilities for the result obtained will be $\frac12\cdot3\cdot\frac23\cdot\frac23\cdot\frac13\cdot\frac12=\frac19$ if A is the fair coin and $\frac23\cdot3\cdot\frac12\cdot\frac12\cdot\frac12\cdot\frac13=\frac1{12}$ if B is the fair coin, so you would guess that A is the fair coin and would be right with probability $\frac19/(\frac19+\frac1{12})=\frac47$. Your total probability of guessing right would thus be $\frac{10}{17}\cdot\frac35+\frac7{17}\cdot\frac47=\frac{10}{17}$.
If you flip B again, the result will be heads with probability $\frac9{17}\cdot\frac12+\frac8{17}\frac23=\frac{59}{102}$ and thus tails with probability $\frac{43}{102}$. If it's heads, the probabilities for the result will be $\frac12\cdot3\cdot\frac23\cdot\frac23\cdot\frac13\cdot\frac23=\frac4{27}$ if A is the fair coin and $\frac23\cdot3\cdot\frac12\cdot\frac12\cdot\frac12\cdot\frac12=\frac18$ if B is the fair coin, so you would guess that A is the fair coin and would be right with probability $\frac4{27}/(\frac4{27}+\frac18)=\frac{32}{59}$. If it's tails, the probabilities for the result obtained will be $\frac12\cdot3\cdot\frac23\cdot\frac23\cdot\frac13\cdot\frac13=\frac2{27}$ if A is the fair coin and $\frac23\cdot3\cdot\frac12\cdot\frac12\cdot\frac12\cdot\frac12=\frac18$ if B is the fair coin, so you would guess that B is the fair coin and would be right with probability $\frac18/(\frac18+\frac2{27})=\frac{27}{43}$. Your total probability of guessing right would thus be $\frac{59}{102}\cdot\frac{32}{59}+\frac{43}{102}\cdot\frac{27}{43}=\frac{59}{102}\lt\frac{10}{17}$.
So you should flip coin A again, and you would guess correctly with probability $\frac{10}{17}$.
A quicker way to do this would be to note that the current a posteriori probabilities for A or B to be fair are very close to $\frac12$, so it's plausible that your guess will be determined entirely by the last flip, and you'll guess that the last coin flipped is unfair if the result is heads and fair if it's tails. Your chance of winning by this strategy is $\frac12$ if you pick the fair coin and $\frac23$ if you pick the unfair coin, so you should pick the coin that has the slightly higher probability of being the unfair coin, A, and your winning probability is $\frac8{17}\cdot\frac12+\frac9{17}\cdot\frac23=\frac{10}{17}$, in agreement with the more systematic solution above.