If the tripartite agreement was on a registered deed, then you may have to file a lawsuit to declare the sale deed of the property sold by the builder as null and void in view of the agreement entered with you.
Alternately you can seek the refund of the entire booking amount paid to the builder including the money the bank had advanced as loan towards this property if it is not possible for the builder to execute the sale deed in your favor in the suit for specific performance of contract.
What prevented you from taking action to file cheque bounce case when the cheque issued by the builder towards refund of amount paid by you through a court order.
In fact yo may not be eligible for filing a suit for specific performance of contract too since the court has already decided and directed the builder to refund the amount cancelling the sale agreement between you and the builder.
You should have stopped paying the EMI amount too ever since, now as you have continued to pay the EMI to the bank, the bank is after you for payment of EMI or discharge of loan amount.
You can discuss with your advocate properly and proceed based on suggestions advised on the basis opf the situations prevailing at your end