Hi. you should have co. B do a new H petition for you. If you left your old job in June your H might have been terminated already by your old company, actually they should have terminated right away. you will have to get your new H stamped at the consulate before entering the us. entering on H status will not make you abandon your I-485 even if you enter the US to work for a different employer. Good Luck!
You have a tricky situation and really need a lawyer to help. You left the US without an Advance Parole, so your 485 could be deemed to have been abandoned. In that case, you would need to file a new 485, however you have left the I-140 employer so you really cannot file a 485 based on that I-140. You could be portable since the 485 has been pending for 180 days, if the new job is similar to the old one, however you cannot be portable if the 485 is abandoned. The question of whether the 485 is abandoned is critical, and needs a thorough legal analysis of your prior H-1B and AOS timing.