Hii
first you have to calculate Capital Gain Amount on old Flat sales then you have to invest the same in new residential property to save tax, you cant finance them to buy flat , you have to invest gain amount in own name to save tax, in some cases investment in wife names allowed.