Investors & landlords

You will report the $23K as the sales price and the $21,500 ($20K + $1500) as cost basis netting a capital gain of $1500.  What you "walk away with" is immaterial on an income tax return.