Where do add my improvements to the cost basis of a rental that was sold?

I have two rental properties that I sold. The first one was rented for several years until the last tenant moved in the summer of 2020. We made renovations and after interviewing potential renters, we changed our minds and it sat empty until the summer of 2021 when we put it up for sale. During inspections for closing it was noted that it needed foundation repairs. The cost was aprox $7000. My question is where to I add this $7000? I assume that because it was no longer a rental at the time of sale, it gets added to the cost basis, but I can't find where in turbotax. I did not convert it to personal use because I didn't move into it. I assume I need to add the improvements somewhere in  Rental Properties and Royalties because I need to recapture the depreciation. Does it get added to selling costs? The second property was rented for about 10 years with the last renter moving out in July 2021.  Remodeling after he moved came to about $9000 including a new roof. The property was put on the market in Nov 2021 and sold in Jan 2022. Again, I'm not sure where to put the $9000 repairs or how to add them to the cost basis or if I should even do that now seeing that it was sold in 2022. Do I need to convert both of them to personal use because they were not being rented when sold?