Just curious. Would it do nothing, would it generate a massive amount of thrust? Would it even work?
There is an alternate way to answer your question, and it relates to thermodynamics.
Think about the purpose of a jet engine. It exists to take uncompressed air, compress it, mix it with fuel, burn it efficiently and then expand it (hopefully adiabatically) to generate a larger volume of gas at higher pressure than the intake. The work done by the engine is described by the Brayton cycle (Figure 3.13 from http://web.mit.edu/16.unified/www/FALL/thermodynamics/notes/node28.html), and this cycle shows us where we can and can't hope to achieve theoretically efficient operation.
If you look at the chart of the cycle in the above reference, you'll note that the compression and exhaustion portions of the cycle are where inefficiency (in the form of entropy) creep in and prevent the cycle from being perfect. As such, even if there were sufficient oxygen left to burn, putting two jet engines back to back would be horribly inefficient (because you are repeating the inefficient portions of each twice).
The better solution is to work towards improving compression ratios, and recovering more work from expansion. Much of this has been done over the last 50 years, and is why Brayton efficiencies are in the 0.6 to 0.7 range for modern jet engines (ref same website, Figure 3.19).
EDIT: Also, remember that jet engines are designed to work on air that is "cold" relative to their exhaust. They don't compress hot gases efficiently. You could certainly design a compressor to efficiently compress hot gases for combustion, but jet engine compressor sections are not designed for this, so the compression achieved by the second engine in your question would be MUCH lower than its design, which would further decrease it's contribution of additional thrust.
Engines need oxygen for fuel combustion.
After most of the oxygen has been extracted and used to oxidize / burn fuel in the first engine, air is no more useful. In the second engine the core combustion wouldn't start, air would just turn the discs, but there would be no compression, so no additional thrust (discs would actually slow the flow).
Afterburners try to burn the remaining oxygen after the core combustion, but there is only the previously mentioned limited quantity to burn. An afterburner is not a second engine, it has no rotating parts, only burners.
In addition of the core flow, a turbofan has a bypass flow. The bypass flow is not used for combustion and still contains its oxygen.
However this flow generates most of the thrust by air compression / acceleration, so anything which slows the cold flow also degrades the engine efficiency.
There is a technique to burn the bypass flow: The plenum chamber, but this requires something different and no rotors are involved.
One jet engine was placed in front of another in a test facility to test the high speed, high altitude performance of the trailing PW J58 when it was chosen to power the SR-71. Test details located here.
You would end up with an extremely inefficient setup, if it works at all. It's not the lack of oxygen, because only 20-25% of the oxygen is begin burnt in the core jet engine, so there should be plenty of oxygen left for the second engine.
The high outlet temperature of the first engine would decrease the power of the second engine dramatically. The exhaust velocity of ENG1 would be reduced by ENG2 as it wouldn't be able to process the incoming volume of air. The turbulent flow will reduce the compressors efficiency as well.
All in all, there would be no benefit to such a setup at all.