Hi and welcome to PF.
You would need to specify the conditions how the work is obtained from the compressed air because the conditions for the expansion will make a difference. Is it Isothermal or Adiabatic expansion?
Is this basically a question about the possible energy in an explosion, if the cylinder ruptures, for instance? A bit more context would help to get the answer you need.