Hello,
If I have understood your query correct. Instead of paying money to your builder you will give him one floor of your property in lieu of money and one floor will be sold by you to some other party in exchange for money.
You can divide your indexed cost of acquisition of the property into 4 parts and adjust a part of it against the sale proceeds of the Second Floor flat. The only risk here is depending on the wordings of your contract, the assessing officer should not consider your case to be of Business in nature rather than Capital Gain.
Trust this clarifies your query.
Feel free to call / get back in case of further clarifications.
Thanking You.
Regards,
Rohit R Sharma
BCOM, ACA, LLB-GEN, CERT. FAFP