The correct answer is: C. Methane gas
A safety lamp is a type of lamp that is designed to be used in hazardous environments, such as mines and tunnels. It is equipped with a special flame that will not ignite flammable gases, such as methane. If a safety lamp causes flames when inserted in the upper portion of a manhole, it indicates that there is a high concentration of methane gas in the air. This is a dangerous situation, as methane gas can cause explosions.
Carbon dioxide gas is not flammable, so it would not cause a safety lamp to produce flames. Hydrogen sulfide gas is also not flammable, but it is poisonous. If a safety lamp was exposed to hydrogen sulfide gas, the flame would be extinguished. Petrol vapours are flammable, but they would not cause a safety lamp to produce flames unless the lamp was very close to the vapours.
In conclusion, the correct answer is: C. Methane gas.