Capital Gains Tax ( sale of house property)

A flat was booked by me in Nov 2006 and a buyer agreement was executed. As per the agreement the builder was to deliver the flat within 36 months.The payment was linked to construction. But the offer of posession was made in october 2016 after receipt of OC from the authorities. Because o considerable delay a case was filed in the consumer court in 2014 demanding penalty as per the agreement to be set off against balance payment due. Unfortunately the case never came up for final hearing even after 5 years. Therefore disgusted with the process a negotiation was undertaken with the builder in May 2020 and the settlement amount paid in installments. The flat has not been taken posession and therefore has not been registered. I now want to sell the property in April 2021 ( after a gap of 15 years from the date of booking amount paid) by way of transfer ( the builder will transfer the flat to the name of the new buyer on getting the requisite fee). Please advise: 1. how is the differential amount shall be treated as per Income tax act? 2. There was a loan taken 2007 ( paid back in full in 2012) from HDFC. What will be the treatment on the interest paid to HDFC? Thanx and Regds. Bichitra P