Solution:
Concept: Avogadro's law: equal volumes of all gases, under the same conditions of temperature and pressure, contain an equal number of molecules. So, at fixed temperature and pressure, the number of molecules is proportional to the volume. The mole concept: one mole of any substance contains the Avogadro number, NA=6.022×1023, of particles (atoms, molecules or formula units), and its mass in grams equals its atomic or molecular mass (the gram atomic / gram molecular mass). So moles=molar massmass and particles=moles×NA.
(i) Moles of hydrogen
Step 1 — Divide the mass by the molar mass.
The cylinder holds 1 kg, that is 1000 g, of hydrogen gas, H₂, whose molar mass is 2 g.
moles of H2=21000=500 mol
(ii) Mass of carbon dioxide the cylinder can hold
Step 2 — Use Avogadro's law.
The same cylinder at the same temperature and pressure holds the same volume of any gas, so it holds the same number of molecules, that is the same number of moles: 500 mol of CO₂.
Step 3 — Change the moles of CO₂ to grams.
The molar mass of CO₂ is 12 + 2 × 16 = 44 g.
mass of CO2=500×44 g=22,000 g=22 kg

(iii) Number of CO₂ molecules
Step 4 — Apply Avogadro's law to molecules.
Equal volumes at the same temperature and pressure contain equal numbers of molecules, so the cylinder holds X molecules of CO₂, the same as of hydrogen.
(iv) The law used
Step 5 — Name the law.
Every step above used the idea that equal volumes of gases at the same temperature and pressure contain equal numbers of molecules. This is Avogadro's law.
Watch out: The cylinder holds equal NUMBERS of molecules, not equal masses: 1 kg of hydrogen does not mean 1 kg of CO₂.
Therefore, (i) there are 500 moles of hydrogen; (ii) the cylinder can hold 22 kg (22,000 g) of CO₂; (iii) it holds X molecules of CO₂; (iv) the law used is Avogadro's law.