There are 9+7+6=22 marbles in total. The probability of selecting a yellow marble would be 9/22. By replacing that yellow marble with a green marble, you aren't changing the total marble count, so the probability of selecting a green marble would be 7/22. Because the two events are independent, their probabilities will get multiplied. Therefore, P(Yellow, then Green) = P(Yellow) * P(Green) = 9/22 * 7/22 = 63/484.
I'd say what you would do is:
You can either
1. Add 15 and 18 together and then divide by 2
OR
2. Since there is a 3 number difference between 15 an 18, just add 3 to 18