At first:
Table X: AAB Table Y: AB
Table X: AAB
Table Y: AB
Let
P(AX) = probability of selecting A from X
P(BX) = probability of selecting B from X
P(BY) = probability of selecting B from Y