Am I eligible for 60day grace period ??

I was working with company A – Full Time with a (H1 B / I 94 validity through September 2019 )till May 2018 and then transferred to Company B - Staffing Company, transfer petition from Company A to B is still pending with USCIS and Company A has withdrawn the H1B . Right now my Client project contract with Company B is ending on January 18th , so Company B is withdrawing the pending transfer petition on January 21st . Will I be able to use 60 days grace period until I find new employer/opportunity , since I have a valid i-94 (OR) since my previous employer has with- drawn the H1b , will my valid i-94 become Invalid ? Please suggest /advice .

You fall under a slight gray area.
Technically, your 60 days grace period has started from the date that your Company A H1B withdrawal was approved by USCIS. (if not approved, from the date they have filed the withdrawal).
Your original I-94 was expired on the above day only(on the day Company A filed the withdrawal).

Since Company B’s H1 petition was not approved at all so far and they are going to withdraw this petition also, you are NOT having any more grace period off this Company B(unapproved) petition.

The best bet for you to quickly find some job who can file your H1 petition ASAP (but dont worry, you are in gray area, you can take slight advantage of little gap, which is not legal but if things happen, you can explain the situation)