H1B expired on 30 Sep 2009,. I believe B company can file my H1B under Cap-Exempt category but till what date ?

I got my H1B approval in Oct 2006 . My H1B visa stamp shows issue date as 09 JAN 2007 and expiration date as 30 SEP 2009 From A company.

I entered US on this visa on 17 MAY 2007 and returned on 7 SEP 2007 because of some family obligations and could not return back to US.

I believe that B company can file my H1B under Cap-Exempt category but till what date can it be done ?

Since you already crossed the period, I dont think you are eligible under cap exempt now. Better consult some attorney to give better confirmation.