Fuel economy of a big heavy 2.4 liter car will never match that of a compact 2.0 AT. Not even if we're comparing a Toyota to a Mazda... hell... we drove the Corolla 2.0 AT for a week... and guess what? It was just as thirsty as a Mazda3 2.0 AT, or worse.

That said... get whichever car is in better condition... but review whether you have the money to maintain either car. The Mazda3 is slightly more expensive to maintain than an older compact... suspension and brake parts cost more and wear down more because it's a heavy car... but the Camry is more expensive to maintain, still.

Within your budget, you can get some pretty good secondhand cars. Don't limit yourself to just two.