1 you can show company B employment change intent /employer switch letter to use AC21, lawyer will prepare it, you can use AC21 because your I-485 has been pending more than 180 days, you can join B or continue working with him
2 Company B can apply for I-40 immediately once approved it can also be used for pending I-485, (if needed)
3 you can also apply new I-140 for CP from company B if it is approved before I-485 approval you can go for consular processing because delays are expected for I-485 approvals one of lawyer has opinion that in future because of INS shifting to DHS more delays.
Once your I-140 is approved for B you can also save time by sending Attorney certified I-140 and full petition for CP, Bombay Consulate, Madras (Chennai) and Delhi Embassy accepts attorney certified I-140 package that way you can get interview date very soon and GC early.