Here , Probability that it is coin B and output is HH after tossing coin 'B' 2 times , P(HH | B ) = (3/4)*(3/4) = 9/16
and Probability that it is coin A and output is HH after tossing coin 'A' 2 times, P(HH | A ) = (1/4)*(1/4) = 1/16
now , Probability of choosing coin A = P(A) = 1/2
and Probability of choosing coin B = P(B) = 1/2
here choosing coins 'A' and 'B' are disjoint events...
Now , using Bayes' Theorem ,
P(B | HH) = P(HH | B)*P(B) / [P(HH | A)*P(A) + P(HH | B)*P(B)]
= (9/16)*(1/2) / [(1/16)*(1/2) + (9/16)*(1/2)]
= 9/10
So, Answer is 9/10