First of all, k may be 1, 2,3, then A may be 1, 2,3,4, and B may be 3,4,5,6.
Because the mathematical expectation of A's card number is greater than B's, and B has at least six cards at a time, because the question is how many cards to ask, B takes 16X3+6=54, and A takes 9X4+6x3=54.