Two methods come to mind:

1. Consider all 18! orders in which you might draw the balls. We want to count the number of orders which give the correct result. To decide on a good order you first decide which of the 9 pairs are the red pairs, then choose the relative order of the 8 red balls and then the relative order of the 10 green balls. Then divide the number of ways by 18!.

2. Let P(r, g) be the probability of succeeding if you start with r red balls and g green balls. You can set up a recurrence relating P(r, g) to P(r-2, g) and P(r, g-2), and you have base cases P(0, g) = P(r, 0) = 1, with that you can work your way up to P(8, 10). (Excel is helpful here)

I did both ways and they give the same answer.