Writing a balanced equation:

Determine the moles of C = mass/ molar mass
mole of C= 2g / 12.01 g = 0.17 mol
mole of oxygen = 15g/ 32g = 0.47 mol
Mole ratio between carbon and carbon dioxide is 1:1. Therefore 0.17 mol Carbon reacts with 0.17 carbon dioxide.
mass of carbon dioxide = moles x molar mass
mass of carbon dioxide = 0.17 x 44.01
mass of carbon dioxide = 7.48 g