Friend A wins if A > B. Since B can only flip 0,1, or 2 heads, there are only three probabilities to calculate:

P(A>0,B=0) = [1-P(A=0)]•P(B=0)

> = [1 - (5/6)⁶](1/2)²

> = 0.665102023319616(1/4)

> ≈ 16.628%

P(A>1, B=1) = [1-P(A=0 or 1)]•P(B=1)

> = [1 - (5/6)⁶ - 6(1/6)(5/6)⁵]•[2(1/2)²]

> = 0.263224451303155(1/2)

> ≈ 13.161%

P(A>2, B=2) = [1-P(A=0,1, or 2)]•P(B=2)

> = [0.26322445 - (6c2)(1/6)²(5/6)⁴]•(1/2)²

> = [0.26322445 - 15(1/6)²(5/6)⁴]•(1/2)²

> = 0.06228566399177(1/4)

> ≈ 1.557%

So the probability of that Friend A wins is going to be (1.557+13.161+16.628)%

> **P(A Wins) = 31.346%**

Conversely, Friend B wins if B > A.

P(A=0, B=1) = P(A=0)•P(B=1)

> = (5/6)⁶•2(1/2)²

> = 0.334897976680384(1/2)

> ≈ 16.745%

P(A=0 or 1, B=2) = P(A=0 or 1)•P(B=2)

> = [(5/6)⁶+6(1/6)(5/6)⁵]•(1/2)²

> = 0.736775548696845(1/4)

> ≈ 18.419%

Then the probability that Friend B wins is equal to 16.745+18.419

> **P(B Wins) = 35.164%**

***Thus, flipping the coin twice has higher odds of winning than rolling the die 6 times does.***