That's a very bad plan that will most likely get you sent to secondary inspection upon arrival at the airport, then most likely refusal of entry based on fraud, with your H-1B visa being cancelled as a result, and the U.S. consulate in Hindustan notified.. Good luck ever getting any type of US visa ever issued to you after that.. You simply cannot ask and expect to be admitted on the old employer's visa, when you in fact never worked for him and also are not currently working for any other H-1B employer!
Kindly be advised that the answer above is only general in nature cannot be construed as legal advice, given that not enough facts are known. It is your responsibility to retain a lawyer to analyze the facts specific to your particular situation in order to give you specific advice. Specific answers will require cognizance of all pertinent facts about your case. Any answers offered on Avvo are of a general nature only, and are not meant to create an attorney-client relationship.
Without an approved petition from Company B, you can not travel on H-1B visa.
This response is general in nature and cannot be construed as legal advice, given that not enough facts are known. Any comments offered on Avvo are of a general nature only, and are not meant to create an attorney-client relationship. You are encouraged to seek independent and private counseling for a complete review of your case.