Stoichiometry has two basic laws: the law of definite proportions and the law of multiple proportions. The latter states that if two different compounds are created by the same elements, and if the mass of one of the elements is kept constant the mass of the other elements are found to form ratios of whole numbers. The use of math is required when dealing with ratios.
In the case of carbon monoxide the ratio of the mass of carbon and oxygen present is 12:16 and in the case of carbon dioxide it is 12:32. If the mass of carbon is kept constant in both the cases, the ratio of oxygen is 16:32 = 1/2. This is a ratio of small whole numbers.
A sample of carbon dioxide has double the mass of oxygen as compared to a sample of carbon monoxide of the same mass.