(a) That's right. Mental disabilities vary in their severity. In some cases, individuals are declared by a court to be permanently unable to manage their own affairs. Such persons cannot validly enter into a binding contract. But that is not the case here.
Sometimes, a mental disability does not permanently impair the affected person's understanding and awareness. In such cases, the affected person can effectively bind themselves by contract. They can only avoid an agreement if they can show that, when they entered into it, their disability prevented them from properly understanding what they were doing AND that the person they were dealing with was aware of that disability. In the example, A could probably show that he was unable to understand what he was doing when he signed the contract, but it seems clear on the facts that the travel agent would not have been aware of A's difficulty. The contract would therefore remain binding on A.
Note: The same principles are applied when a lack of understanding is caused by intoxication by alcohol or other drugs, or by accidental injury.