Two cylinders A and B each contains 30 cm3 of oxygen and nitrogen respectively at…