Question 1206870
<pre>
Let R = the number of red marbles at the beginning.
Let B = the number of blue marbles at the beginning,
Let x = the the number of blue marbles exchanged for red marbles.  <--the answer
There are R+B marbles at the beginning and at the end.  
The given information 

{{{system(R=expr(5/7)*B, R+x=expr(5/9)(R+B))}}}

R, B, and x are all positive integers.

Since {{{R=expr(5/7)B}}} B is a multiple of 7, say B=7p, where p is a positive
integer.
Then {{{R=expr(5/7)(7p)}}}
or R=5p

{{{R+x=expr(5/9)(R+B))}}}
{{{5p+x=expr(5/9)(5p+7p)}}}
{{{5p+x=expr(5/9)(12p)}}}
{{{5p+x=expr(20/3)p}}}
{{{15p+3x=20p}}}
{{{3x=5p}}}
{{{x=expr(5/3)p}}}
So p must be a multiple of 3, say p=3n, where n is a positive integer.
{{{x=expr(5/3)(3n)}}}
{{{x=5n}}}

{{{R=5p=5(3n)=15n}}}
{{{B=7p=7(3n)=21n}}}

So every solution in integers is of the form.

{{{system(B=21n,R=15n,x=5n)}}}

You did not list the possible choices, but all you have to do is look for x
being a multiple of 5.

Let's check the smallest possible solution where n=1. B=21, R=15, x=5</pre>There were 5/7 as many red marbles as blue marbles in a jar.<pre>That checks because 15=(5/7)(21). Now there are R+B=21+15=36 marbles total, before 
and after the swapping is done.</pre>Dave took some blue marbles out of the jar and replaced them with 
the same number of red marbles. The number of red marbles became 5/9 
of all the marbles in the jar.<pre>When 5 blues are swapped for reds there are 21-5=16 blues and 15+5=20 reds,
and indeed, 20 = (5/9)(36). So that checks also.

Edwin</pre>