In your case, company B does not need to sponsor you green card (GC) by filing another LC or EB2 for your position. You are eligible to port your 140 over.
So, the only favor you need from Company B is to write an employment verification letter,enclosing your title, job duty, salary, starting date etc. This can be attainable from human resources, usually.
USCIS will justify your GC eligibility by requesting this letter via a RFE letter, if they feel necessary.
You may not get any RFE if they don't suspect significant change of field, or unemployment.
If Company B does not want to sponsor you H1b, you will need EAD to work. Well, this is another matter of concern, partly independent of your question.