Rules like this one exist to protect the trust between spouses, if anything said in confidence to a husband or wife could later be repeated in court against them, spouses would hesitate to speak freely with each other at all. Keeping that purpose in mind is a useful way to test each option, since any reading of the facts that undermines this purpose is probably the wrong one, and any reading that preserves it while still allowing independently known facts to come in is probably right.
Only the third option protects the confidence between the spouses, which is the whole point of the rule, while still permitting X to testify about what she independently witnessed.
Therefore, the correct answer is X is not allowed to appear as a witness to depose what was told by the husband to her, however, she can depose what she saw.