les saisies is right.
also, the dealer should NOT have accepted your part exchange, without a letter from the company that you were paying for the car to, stating that their is "no Interest" (no outstanding finance) owed on the vehicle. If he had advised you that "sorry sir but without this letter we cant accept your part ex, as technically the loan company own your vehicle" then this maybe would have signalled to you that you sould have settled the finance first. You can not part ex/sell a car that does not belong to you.
unfortunately the loans now rest with you. I hope everything sorts itself out for you, its a real shame that these things happen to honest people.