Need Help with sold rental house!

  I bought this rental house in 2018 for 179K (land value $21331 base on appraisal)  plus legal fee and etc total of 186K.

I use it 100% for rental business.

My depreciation: $12969

I sold it in 2021 for 240K (land value the same $21331, so I put $218669 for asset sale and $21331 for land sale = total of 240K)

And I pay for commission fee and etc for 13K.

So my question is how I enter those information into the sale of Property/ Depreciation section? Am i filled them right ? Please see pictures below. I don't understand why my gain is $58190. I thought support to be 240k - 186K (cost of basic) - 13K (commission and legal fee) = $41000

Can someone help me if i did something wrong? Thank you so much

1.PNG

 

2.PNG3.PNG4.PNG5.PNG