FAR mcq on nonmonetary exchanges

Hi all, I have a difficulty in understanding why the gain is 30,000 instead of 35,000? why are we using the fair value of the land instead of the machinery? A company exchanged land with an appraised value of $50,000 and an original cost of $20,000 for machinery with a fair value of $55,000. Assuming that the transaction has commercial substance, what is the gain on the exchange? A. $0 B. $5,000 Correct C. $30,000 D. $35,000