Transition rule allows you to treat as separate employers for year of transaction and following year, so you would have through 2020 if desired. However, neither plan can be amended to change coverage or, if I remember correctly, benefits, otherwise you lose "protection". IMPORTANT - double check both plan documents prior to the transaction closing to make sure neither automatically covers all the employees of the control group.
Also, if B becomes part of A rather than remain a separate company, you'll want to make sure A's plan has language that will exclude former employees of B that are now employees of A.
I think most pre-approved plans have built in provisions to cover both of the above scenarios, but you should check, obviously, to make sure.