Can anyone tell me what is wrong with the following argument?
Consider a Carnot engine and an engine $X$ whose efficiencies are $\eta_c$ and $\eta_x$ respectively. Let us assume that $\eta_c>\eta_x$.
Now couple engine $X$ to the Carnot engine as shown:
We adjust the strokes of the pump X such that the work it requires per cycle is just equal to that provided by Carnot engine. Thus no external work is performed on or by the setup shown.
According to our assumption, $$\frac{|W|}{|Q_c|}>\frac{|W|}{|Q_x|}\implies|Q_x|>|Q_c|$$
Because the work done by the Carnot engine is equal to the work done on $x$, we have, from the first law of thermodynamics$$|Q_x|-|Q_1|=|Q_c|-|Q_2|$$
which we can write as $$|Q_x|-|Q_c|=|Q_2|-|Q_1|=Q$$
Because of our assumption, $Q$ is positive.
So the net effect of X and the Carnot engine, working in combination, is to transfer energy Q as heat from a low temperature reservoir to a high temperature reservoir without the requirement of work. Thus the combination acts like a perfect refrigerator whose existence is a violation of the second law of thermodynamics.
We conclude that no real engine can have efficiency less than that of a Carnot engine when both engines work between the same two temperatures.