This is percent composition
The formula for that is
(Mass of part/total mass) x 100
What’s the total molar mass of CO2?
12.01 +16(2) = 44.01 g/mol
What is the molar mass of Carbon?
Since there is only one carbon it is 12.01 g/mol
(12.01/44.01) x 100 = 27.29%