Question 636706
Let the number of red marbles be {{{r}}} .
Let the number of green marbles be {{{g}}} .
Let the number of blue marbles be {{{b}}} .
All the marbles means {{{r+b+g}}} marbles.
The fact that all but 15 of the marbles are blue means that
{{{r+g=15}}} (15 of those marbles are either red or green).
The fact that all but 13 of the marbles are red means that
{{{g+b=13}}} .
The fact that all but 12 of the marbles are green means that
{{{r+b=12}}} .
We have a system of 3 linear equations with 3 variables:
{{{system(r+g=15,g+b=13,r+b=12)}}}
Subtracting the second equation from the first, we get
{{{r+g-(g+b)=15-13}}} --> {{{r+g-g-b=2}}} --> {{{r-b=2}}}
Adding that to the third equation we get
{{{r+b+(r-b)=12+2}}} --> {{{r+b+r-b=14}}} --> {{{2r=14}}} --> {{{2r/2=14/2}}} --> {{{highlight(r=7)}}}