James has a prize race horse named Mr. Ed. James is in desperate need of some quick cash so he goes to a wealthy local horse trainer to see if he can borrow $50,000 from him. The wealthy horse trainer agrees to loan the $50,000 to James, but wants to hold Mr. Ed at his stables as collateral. James agrees, and delivers Mr. Ed to the horse trainer in exchange for the $50,000 loan. No paperwork is signed, everything is oral. Once James pays back the loan in full with interest, Mr. Ed will be returned to James. James then immediately goes to Local Bank to get a $30,000 loan, and signs paperwork giving Local Bank a security interest in Mr. Ed. James does not disclose to the bank that he has just borrowed $50,000 elsewhere and put Mr. Ed up as collateral. James then disappears with the $80,000, never to be heard from again. He made no payments on either loan from the trainer or bank. The bank obtains a writ of execution from the local court, and the sheriff seizes Mr. Ed from the horse trainer and sells Mr. Ed at auction for $40,000. Who gets what portion of the $40,000, and why ?