This is controversial topic recording gain/loss based on FMV or using NBV with no recognizing gain/loss.
Whether it’s an exchange of similar or different assets, there is a high possibility of Commercial Substance. An exchange has commercial substance if the future cash flows change as a result of the transaction. That is, if the two parties’ economic positions change, the transaction has commercial substance.

Has Commercial Substance
Recognize gains and losses immediately.
Cost of New Asset = Cash paid + FMV of the old asset
(Where: Cash paid = New asset price – Trade-in allowance)
Gain/Loss of old asset disposal = FMV of the old asset – NBV of the old asset
Dr. New Asset (as per above)
Dr. Acc. Dear. of old asset (from books)
Dr. Loss of disposal
Cr. Old Asset (original cost from books)
Cr. Cash/AP (cash paid)
Lacks Commercial Substance
Defer gains and losses
Cost of New Asset = Cash paid + NBV of the old asset
Dr. New Asset (as per above)
Dr. Acc. Dear. of old asset (from books)
Cr. Old Asset (original cost from books)
Cr. Cash/AP (cash paid)
References: IFRS, Intermediate Accounting (Kieso, …)