As you have made your final payment and acquired possession of the flat in August 2016 and the proposed sale of the old flat is in May 2017, you are eligible to claim exemption u/s 54/54F, subject to fulfilment of conditions as applicable to you.
The market value of the flat in Mumbai as at 1st April 2001 shall be the cost of acquisition and the indexed cost of acquisition shall be taken on the basis of index, which is yet to be prescribed, for the current financial year.