Cindy exchanges investment real estate with Russell.

Cindy exchanges investment real estate with Russell. Cindy purchased her realty two years ago for $280,000, and it is encumbered by a mortgage of $100,000 and has a fair market value of $320,000 when exchanged. Russell paid $80,000 cash for his property in 1999 and it is appraised at $150,000 on the day of the exchange. Russell assumes the debt on his new land and pays Cindy enough in cash to balance the exchange. What is Cindy’s recognized gain (loss) on the exchange?

how is the answer $40K recognized gain?