Geeze... kids and their "NOS"...
First of all... it's not "NOS"... Nitrus Oxide is N2O... NOS is a brand name, like Vice Grips...
Second... nitrus oxide is an oxidizer... it's 2 parts nitrogen, 1 part oxygen... in other words, 33% oxygen. By itself it is not flammable in any way. However, what does a fire need to burn? Oxygen. Our atmosphere is about 18% oxygen... so there's almost twice as much Oxygen in N2O as there is in the normal air. If you know anything about internal combustion engines, the more oxygen you have, the more fuel you can burn, and the more power you can make. THAT is why nitrus oxide increases power. Just adding N2O on your car won't do much except burn holes in your pistons because adding oxygen will lean out the mixture and a lean mixture burns hotter... hot enough to melt you aluminum pistons... you have to add more fuel as well to keep an optimum air/fuel ratio.
As far as the RPM go... 40,000 RPM with an internal combustion engine is impossible. It just can't happen with today's materials and the laws of physics. The rotating mass (crankshaft, connecting rods, and pistons) cannot be made light enough and strong enough to withstand the forces created by spinning it at 40,000 RPM. The forces on a connecting rod at 8,000 RPM is tremendous... which is why there are few piston engines that are capable of turning that fast.
On a side note... nitrus oxide is not the same stuff at the dentist office... automotive nitrus oxide is not approved for "human consumption" and has many impurities in it that will kill you if you inhale enough of it... so don't get any ideas you druggies