Mr. B's first sentence "I know you don't know this card", if A takes a single card, Mr. B's judgment may be wrong. Since Mr. B is sure, it means that Mr. B knows in advance that A can't get a single card, which means that spades and flowers are excluded; That is, Mr. X said that the color of this card is: hearts or diamonds;
Now look at this card that may be drawn:
Hearts: a, q, 4
Diamonds: a, 5
Now that Mr. A knows, the point is not A. If it is A, Mr. A can't deduce it even if he knows the color. That is, Mr. A said that this point is not A, so leave:
Hearts: q, 4
Square: 5
Finally, Mr. B also knows that the explanation can only be square. If you say it's a heart, Mr. B still doesn't know which card it is.
The final answer is: box 5.