Just some comments: First, it is poor practice to use constants with so few significant figures that the constants contribute to the error of the results. H has a mol mass of 1.00797, C 12.011 and O 15.9994 not using 1.008, 12.001, and 15.999 is sloppy/lazy. I got a mass of C as 1.969686 (ignoring significant figures "inside" a calculation is better than trying to manage them; apply significance to the results after you're done number crunching. You got a mass of 1.96. One of us is very wrong. A 2% error 1.96 vs 1.97 FROM CALCULATION is really inexcusable (unless you're doing it in your head, or need it to keep your spaceship from crashing in the next 2 minutes and are doing it on a wall with your own blood...). Next, your "calculation":(7.217 g x 1mole x 1 mole Carbon x 12 grams) / 44g CO2 is RUBBISH. The use of the unnecessary parentheses suggest you don't understand when to use them, but that is a minor issue. Dimensional analysis (working with the units of measure) of that calculation results in your 'final' units to be (grams² x moles x moles C ÷ grams CO2 )
This indicates a profound misunderstanding of what you are doing.
In a mole of CO2 there is 1 mole of C and two moles of O. You probably know this. That means there are 12.011 grams of C and 31.998 grams of O in one mole (44.009 grams) of CO2. The calculation is 12.011 (grams C)/(12.011 +31.998)(grams total) = 0.2729 (g C/g total) and there's nothing wrong with claiming this as 0.2729 without any units (g/g "cancel") and the ratio can be used without having to continue to manage its units making further calculations easier. It is true that 7 g of CO2 can be multiplied by 0.2729 to get 1.97 g of C. (note that if we carry through the units of the ratio 0.27 gC/gTot that the dimensional analysis gives us gTot (same as gCO2) x gC/gTot which gives us units of gC → showing that we've done it right (in other words, it can be useful to carry the units through calculations). You should NOTE that "moles" don't come into this, although arguably you could claim that it isn't 12.011 gC; it's 12.011 g C per mole (or per mole C). NONE of this justifies what you did in multiplying (not dividing!) by moles! Wrong, wrong, wrong. Doing the calculation for the H, it is 0.33068 grams of H another HUGE mistake you made (0.3307 g of H is 0.3281 moles of H, which is, I suppose where you screwed up).
Think of dimensional analysis as a check that your calculation makes sense. What you did makes no sense at all, imho. But don't get discouraged; the process of understanding what you're doing, rather than throwing things at the wall takes practice time.