Tripartite agreement, amount payable, TDS payable

I want to buy a flat in an under construction building in Mumbai which is currently booked by Mr X. Purchase consideration by Mr. X Rs. 25 lacs Payments made currently by Mr. X Rs. 5 lacs Purchase price to be paid by me Rs. 35 lacs Mr. X currently has the allotment letter from builder and has made part payment of 5 lacs to the builder. 1)Can you please guide me if there should be a tripartite agreement for me to purchase. 2) Whom should I make the payment of Rs. 35 lacs a) full Rs. 35 lacs to builder or, b) I need to pay Rs. 15 lacs to Mr. X ( 5 lacs paid originally and 10 lacs of capital gains) and rest Rs. 20 lacs to the builder 3) While depositing TDS whose name and PAN No. should I mention in the TDS challan ? The builders or Mr. X ( suppose I pay 15 lacs to Mr. X and rest to builder then whose name & PAN no. should be in TDS challan ) 4) GST has to be paid on full 35 lacs or only on the unpaid Rs. 30 lacs ( 35-5). 5) The builder is providing a stack ( stilt ) parking. Should it be mentioned in the agreement so that builder latter doesnot go back on his word.