IF stoichiometric quantities of X and Y are placed in a sealed, flexiable container container with an initial volume of 30 L at STP, what volume of Z will be produced? Given that XYZ are gases.

The correct answer is 10 L. But I don't understand the logic behind getting the answer. If someone can explain it, it will be great. thanks as always!