I am not sure this question makes sense.
Look at instructions for reporting gain on sale of personal residence when property has been used for both business and personal. This would not be reported until the property is sold.
Sounds like ownership didn't change. Use changed. So not sure how you are getting to a sale and specifically two years later.
Look at gain exclusion when selling to a related party. Does your thinking even work?
This is probably what you are looking for: https://proconnect.intuit.com/community/help-articles/help/disposition-of-a-schedule-e-rental-proper...
A fine is a tax for doing wrong. A tax is a fine for doing well.