@iwannaCPA ,You may memorize this way ,boot paid ,no gain.
Boot received is more than 25% then it's like commercial substance.
If cash is received in an exchange that has no commercial substance, part of the realized gain is recognized if the cash is less than 25% of the total consideration received. For example, if a machine with a fair value of $20,000 and a carrying value of $15,000 is exchanged for a similar machine and $3,000 in cash, part of the $5,000 ($20,000 – $15,000) realized gain will be recorded. In this case, since the cash is 15% ($3,000 ÷ $20,000) of the fair value of the old asset, 15% ($750 = $5,000 x 15%) of the realized gain will actually be recognized.
If cash is more than 25% of the total assets received, the exchange is treated as a cash sale and the entire difference between the fair value and carrying amount of the old asset is booked as an income statement gain.
If the carrying amount of the old asset is greater than the fair value of the assets received, the entire loss is booked and the new asset is recorded at the lower fair value.