H1B extension filed after I797 expiration but before I-94 expiration

Hi My I797 is expiring on May 11,2019 and I-94 is expiring on May 21 2019. My employer is in process of filing my extension but he says it will take 7 to 10 days to get new LCA so might not able to file before expiration of my i797.

My question is

  1. H1B extension petition should be filed before I797 expiration or I-94 expiration?
  2. Can I continue to work with till my I-94 expiration or should I stop after my I-797 expiration?

Your latest H1B approval comes with an I-94 attached at the end of the same approval, thats what should be your current I-94 date(provided, you dint exit and enter US during its validity time). Thus, get your latest I-94 and use that date as your latest eligibility on that visa.
Without a proper extension filed before the concerned visa validity expiration date, you should be leaving the country. Talk to your employer to make sure that the dates are properly aligned. I think that there are ways to get the LCA early.