I just read about these and do not have real experience
There is a big possibility that you would have to pay the other banks. Bank A will not pay X Y Z.
If no one bids for it, Bank A will "buy" it at the loan amount, then negotiate with XYZ to clear these other loans, hold a clean title as REO, then market it again.
This is my understanding.
Unless you know what you are doing, I do not recommend to buy at the court auction.