Let's see that in the periodic table, we have the molar mass of every element. In this case, carbon has a molar mass of 12 g/mol and oxygen of 16 g/mol. The conversion from grams to moles is dividing the mass by the sum of the molar mass of the compound.
In this case, we have 1 atom of carbon and two atoms of oxygen. Doing the algebraic sum for each of them with their molar mass we're going to obtain:
So, 225 g of carbon dioxide will be:
So, finally, we have 5.11 moles in 225 grams of CO2.