Let G be the number of green marbles and B the number of blue marbles. With the data given we can set the following system of equations:
Substituting the second equation in the first one, and solving for B we get:
Substituting B=18 in the second equation on the board we get:
Answer: The number of green marbles is 41, and the number of blue marbles is 18.