Mr. Brown is correct ... you can not enter the US more than 10 days before the H validity period.
Also, what you are proposing is an incredibly tricky 'juggling act' that needs to be orchestrated by the Company B Immigration attorney.
PROFESSOR OF IMMIGRATION LAW for over 10 years -- This blog posting is offered for informational purposes only. It does not constitute an attorney-client relationship. Also, keep in mind that this is an INTERNET BLOG. You should not rely on anything you read here to make decisions which impact on your life. Meet with an attorney, via Skype, or in person, to obtain competent personal and professional guidance.
First, the H1 should be approved. To reenter with a visa you have to convince the consulate. Your immigration attorney for the new employer should be able to guide you on what to do upon approval of the petition. Best Wishes!
13295 Illinois St., Ste 128
Carmel, IN 46032
Ph: (317) 660-6174