Let:
r=number of roses sold
h=number of chocolate hearts sold
r=h+15.......number of roses sold is 15 more than hearts (given info)
Then:
5r+3h=339
5(h+15)+3h=339.......substitute expression for variable "r"
5h+75+3h=339........distribute
8h+75=339........combine like terms
8h=264........subtract 75 from both sides
h=33..........divide both sides by 8
So, 33 chocolate hearts were sold.
Now substitute h=33 into the equation r=h+15 to arrive
at the number of roses sold.....
r=33+15
r=48
So, 48 roses were sold
Now let's check our work. Substitute the two values into
the equation for $$cost.....
5r+3h=339
5(48)+3(33)=339
240+99=339
339=339........check√, our values are correct
Summary....48 roses and 33 chocolates hearts were sold.