How does Babylons's second stage wonder work for building/discarding your last two cards?
The designer, Antoine Bauza, has responded to this question on BGG, it is as if the Babylon player had two turns. You get to produce resources twice, buy twice from your neighbor, and even receive production from your newly built/discarded 6th card.

Q: When playing both cards in round 6 to build two buildings: Can you use one resource twice for each of the buildings?
A: Yes, it's two different cards, like two different turns... The first could help you to play the second (discard the 6th for money and use the money to play the 7th for example...)

This can also be somewhat surmised from the rules, since you need to have that stage of the wonder built to &quot;use it.&quot; (page 9)

Clarification: - during the sixth turn, the player can therefore play both cards they have in hand. If the second stage of the Wonder is not built, the Babylon player can then build it on their sixth turn and then play the seventh card instead of discarding it.