On the surface, this doesn't appear to be a controlled group, as A & B don't own MORE than 50% of Company 2, assuming no attributed ownership. Are they an affiliated service group?
If they are neither a controlled group nor an affiliated service group, then they should be able to have two separate plans.
These situations usually turn out to be either a CG or an ASG - sometimes with "hidden" attribution such as stock options, or additional ownership due to voting vs. nonvoting stock, or family members, or something, but not necessarily. I always recommend that the client seek the advice of ERISA counsel when determining if a CG/ASG exists.