Usually in this type of situation, there may be two options.
OPTION - 1 - Both the A and B are located in one place. One of them started earlier and subsequently the second one developed as a part of extension of existing factory. Then the extended site plan should be approved by the factory directorate. Other formalities - Trade License, Pollution etc. to be taken care and compliance under labour laws will be common.
OPTION -2 Both A & B may be in same location or at different locations under the same management. There is possible to get different Factory license, Trade License etc. and compliance under labor laws will also be different. Usually if the factories are at different locations, it will be better to have two set of compliance.
JSW Bengal Steel started the factory at Salboni, WB. But it has not been finally finished. It has all approval and compliance under JSW Bengal Steel. Subsequently, the same management started JSW Cement Plant at the same premises with absolutely different entity - Factory license, PF, ESI etc. compliance differently - there is no issue.
USD HR Solutions has one client who are in the business of Pathology, imaging etc. under one roof and one management with 4 different organizations - registration under S & E Act differently, different labour laws compliance - even under two entities number of employees is less than 10 and no ESIC compliance. All organization has PF registration ( voluntarily and normal ) .
It depends on management strategy how to run the organizations with proper compliance.