Step 1: Recognise the pattern for heavy metal nitrates.
Nitrates of metals below magnesium in reactivity, such as lead, do not decompose into a simple oxide plus a nitrite the way group one metal nitrates do. Instead they break down further, releasing brown nitrogen dioxide fumes along with oxygen.
Step 2: Identify the white starting solid.
A white crystalline solid that fits this heavy metal nitrate pattern and gives $\text{PbO}$ on heating is lead nitrate, $\text{Pb(NO}_3)_2$, so $X = \text{Pb(NO}_3)_2$.
Step 3: Write and balance the decomposition. \[ 2\text{Pb(NO}_3)_2 \xrightarrow{\Delta} 2\text{PbO} + 4\text{NO}_2 + \text{O}_2 \] The nitrogen escapes as brown $\text{NO}_2$ fumes, matching gas $Y$, while the leftover oxygen escapes colourless, matching gas $Z$.
Step 4: Assign the letters.
Putting it together gives $Y = \text{NO}_2$ and $Z = \text{O}_2$, exactly the colours described in the question. \[ \boxed{X = \text{Pb(NO}_3)_2,\ Y = \text{NO}_2,\ Z = \text{O}_2} \]