Hello. Recently I'm reviewing physical chemistry text, and I want to get some help.

I have a question about sign convention of work and heat in a proof of the equivalence between Clausius principle and the 2nd law. My lecture note brings up a model where two heat engines are combined like this:

Heat engine 1 releases [itex] -Q_{1c} [/itex] and do work [itex] -W_{1} [/itex] when it's given [itex] Q_{1h} >0 [/itex] . However, Heat engine 2 is working reversely with usual manner, nearly as refrigerator. It steals [itex] Q_{2c}>0 [/itex] from a cold source, and give away [itex] -Q_{2h} [/itex] when it's given [itex] W_{2} [/itex]. Then apply the 1st law to each heat engine and a combined one.

[tex] Q_{1h}+Q_{1c}+W_{1}=0 [/tex]

[tex] Q_{2h}+Q_{2c}+W_{2}=0 [/tex]

[tex] Q_{h}+Q_{c}+W=0 [/tex],

where [itex] Q_{h} [/itex] is heat provided with the combined engine, and [itex] -Q_{c} [/itex] is heat released to the sink, and [itex] -W [/itex] is work done by the combined one.

The note says that heat and work of combined system can be expressed as

[tex] Q_{h}=Q_{1h}-Q_{2h} [/tex]

[tex] Q_{c}=Q_{2c}-Q_{1c} [/tex]

[tex] W=W_{2}-W_{1} [/tex]

Now I'm confused by these relations. [itex] -Q_{2h} [/itex] is a released heat from the engine 2, and it seems like getting out from the whole system. Then why not [itex] Q_{h}=Q_{1h}+Q_{2h} [/itex] in the whole system? In the same reason, I thought [itex] Q_{c}=Q_{1c}+Q_{2c} [/itex], but it was also a different result.

I really want to know where I'm wrong.