Two rigid tanks (A and B) each contains 1 kg air, A at 250 kPa, 800 K and B at 100 kPa, 300 K. We now connect the two tanks thermally with a heat engine so A is the hot side and B is the cold side. As heat transfer takes place the heat engine produces work until the temperature is the same in the two tanks and then the process stops. Assume everything is reversible and find the final temperature of the air in the two tanks and the total work given out by the heat engine.