Just clarifying, are you referring to plan sponsored by A? It appears you want to count capital gains from a corporate sale as employee compensation; does that meet the plan's definition of comp?
On another note, did the owners/HCEs negotiate so that B (or B's plan) will recognize all the A-service? For example, this would enable the NHCEs to participate in B's plan (assuming there is one) immediately. If not, perhaps there is still time to do so. (BTW, if the answer to that question is NO, my response is "shame on you".)