I will assume that it is impossible for the employer to accommodate both disabilities.
As noted in the comment by MSalters. It is a common law principle that employers must provide reasonable accommodation for their employees' individual needs. However, this should not place undue hardship upon the employer.
This means that in a situation like this, we would look at the facts. If employee A is already at the company, then it would create an undue hardship upon the employer to also accommodate B's needs as well and so it may not be possible for B to work at this company if they are unable to accommodate their needs.
Although these are common law principles, they are often refined on a statutory basis. In the united-states, refer to the Americans with Disabilities Act 1990:
Sec. 12111. Definitions
(10) Undue hardship
(A) In general
The term “undue hardship” means an action requiring significant difficulty or expense, when considered in light of the factors set forth in subparagraph (B).
(B) Factors to be considered
In determining whether an accommodation would impose an undue hardship on a covered entity, factors to be considered include—
(i) the nature and cost of the accommodation needed under this chapter;
(ii) the overall financial resources of the facility or facilities involved in the provision of the reasonable accommodation; the number of persons employed at such facility; the effect on expenses and resources, or the impact otherwise of such accommodation upon the operation of the facility;
(iii) the overall financial resources of the covered entity; the overall size of the business of a covered entity with respect to the number of its employees; the number, type, and location of its facilities; and
(iv) the type of operation or operations of the covered entity, including the composition, structure, and functions of the workforce of such entity; the geographic separateness, administrative, or fiscal relationship of the facility or facilities in question to the covered entity.
The considerations set out above would protect an employer in a situation where it is impossible for them to accommodate both individuals' needs simultaneously.