Really tough problem. See this link for the algebraic way:
http://www.manhattangmat.com/forums/official-guide-220-t1210.html
Let's say Mary gives John $10, so y=10
That $10 represents 1 hour's worth of work. You can see this if you start from the case in which they each DO earn the same rate (that is, make the same amount for the same number of hours work). Together, they worked 18 hours, so if they had each done half, they would've worked 9h. However, John worked 10h and Mary worked 8h. John worked one of Mary's hours, essentially, raising John's total by 1 and lowering Mary's total by 1. The $10 she gives him essentially pays him for his extra hour of work (and penalizes her for her extra hour of leisure).
So the $10 represents one hour of work. Together they worked 18 hours, so the total amount paid to them is 10*18. They each earn only half, though, so we actually want to multiply 10*9 to get just John's wages. 10*9=90 = the amount John was paid in advance.
Plug y=10 into the answers; only E returns 90.