this is gifting, the receiver inherits the cost basis of the property from the giver. and the giver do not have capital gain or loss.
If they sell for cheap to each other, the cost basis/capital gain would be complicted for giver and receiver. There are tax laws for partial gifts, but it's complicated.