EAD form I-765, For question 10, I-94 number

My original H4 (and thus stamped Visa) was valid till Sep 2015, the H4 extension was applied in Jan 2015 to be now valid till Jan 2018. After which, I traveled to India in June 2015 and came back on the stamped Visa (expiring in Sep 2015) which was still valid. Thus the I-94 issued at that time says admit upto Sep 2015 (this is now the latest I-94 but has expired now. Though I am still legally in here). The question is should I put the I-94 number that I received as part of I-797 application during H4 extension -issued in Jan 2015 (valid till 2018) or the latest I-94 issued in Jun 2015 (expired in Sep 2015).

If I understood the question correctly, you received I-94 ABC in Jan 2015 valid until Jan 2018. You then received I-94 XYZ in Jun 2015 valid until Sep 2015.

The latter is the more recent I-94 as it was issued later. Why do you say that you are inside US legally when your I-94 has expired? Is your attorney aware of this?

The PoE officer should have issued I-94 on the basis of petition and not visa stamp. Did you show that officer extended H-1 797 when entering US in Jun 2015?

OMG! What should I do now?
Yes my attorney is aware of this and never said anything to me, infact just last week I forwarded the I-94 to them (the latest one that expired in Sep 2015) and they didnt say anything.
What should I be doing now?