Suppose that is the number of balls having green on them.

Suppose that is the number of balls having red on them.

Suppose that is the number of balls having both colors on them.

Now we are given that .

The total number of balls is .

Using that we can get that the fraction of the balls in the jar have both red and green colors is .