First set up an equation. 3x+y=21. (for Erika) and 3x+3y=39(for Irene). then use substitution or elimination to solve. I think elimination would be easier because the x's are both three. Multiply one equation by -1 so the x can cancel out. Now you have 3x+y=21 and -3x-3y=-39. the x cancel so you combine the two equations leaving you with. -2y=-18. divide both by -2 and y=9. so the gram of gummy bears is $9. using this, you plug it back into either equation. 3x+3(9)=39. now solve. 3x9=27, 3x+27=39. subtract 27 from both sides. 3x=12. divide both sides by 3. X=4. 1 gram of cinnamon is $4