Hey.
Actually the second one is correct, the first one is not.
When you trade ABC for XYZ, it means, you give ABC, and receive XYZ.
When we breathe, we breathe out carbon dioxide (as a waste product), and breathe in oxygen.
So you should be saying, "My lungs trade carbon dioxide for oxygen".