Can we stack a 3750G-12S-S switch with a 3750-E-24TD-S switch and if it's possible please guide me ??? and what is the best IOS ???
Yes you can.
If your 3750G-12 has a flash size of 16 mb then the highest IOS you can use is 12.2(55)SE and later (SE1, SE2, SE3, SE4, SE5 with SE5 being the latest).
As what Reza has provided, the entire stack should be running the same IOS and the same feature set.