Since you did not specify how often the interest is compounded, I might not be able to give you an exact number, but let's try:
I'll assume (for simplicity's sake) that the interest is compounded annually.
Then A = P(1 + r/n)nt = ($30,000)(1 + r/n)nt
Since I have assumed the number of times the interest is compounded is only once per year, n = 1 and our equation becomes:
A = ($30,000)(1 + 0.08)t
At the end of the first year
A1 = ($30,000)(1.08) = 32,400 for both Bob and Mary
Here's where things get tricky. At the beginning of year 2 Bob adds another $2,000 and Mary adds $1000 to the principal.
Bob's numbers in green, Mary's numbers in orange:
A2 = ($32,400 + $2000)(1.08) = $37,152; A3 = ($37,152 + $2000) = $42,284.16 (Bob)
A4 = ($42,284.16 + $2,000)(1.08) = $47,826.89
And for Mary
A2 ($32,400 + $1,000)(1.08) = $36,072 A3; = (36,072 + $1,000) = $40,037.76 (Mary)
A4 = ($40,037.76 + $1,000)(1.08) = $44,320.78
At the end of 10 years, Bob will have $91,740.87 and Mary will have $78,25431.
Beginning at year 11, the situation reverses itself and Bob starts adding $1,000 per year while Mary increases her contributions to $2,000.
Here's where things get a bit embarrassing. At the end of 20 years, I have Bob with $211,375.52 and Mary with only $200,236.17, which I don't think is the way things were supposed to work out. I'll continue working on this to see if I can find a flaw in my logic.