The independent variable is the money earned because John will earn $10 for each lawn he mows. This is true if he mows 1 lawn or 20 lawns; he will earn $10 per lawn. The dependent variable is the number of lawns. That is not a given. How much he will earn depends on the number of lawns mowed.
So the answer is the first one above. The independent variable is the money earned. The dependent variable is the number of lawns mowed.
This would also be true in other situations. For example, if a candy bar costs $1.50. The independent variable is $1.50. That price is that price per candy bar regardless of whether you buy 1 or 10. The dependent variable is the number of candy bars purchased. How much your overall total is depends on the number purchased.