The concept is possible, but A being upside down on the loan will complicate things significantly. B will never find a lender willing to loan him enough money to pay off A's loan in full. Somebody has to come up with the difference.
B would also be making a huge gamble. A is a credit risk, and now B would be making a huge leap of faith that A would make all his payments. If A doesn't, B's lender comes after B and now B has crappy credit too.
Bottom line, it's a great deal for A and a huge risk for B.
Edit: Left out a very important detail here. When there's a lender involved, that lender holds the title of the vehicle until the loan is paid back. Effectively, that means A can't sell the car without A's lender's permission, until the loan is paid off. So starting out, A has the car, but A's lender has the title. When B & B's lender approach A & A's lender to buy the car, the money from B's lender will go to A's lender, the cash from A or B needed to make up the upside down difference will go to A's lender and then A's lender will turn the title over to B's lender. Now B is in the same position as A was in that B can't sell the car until B's lender has been paid in full. So, since A will not be coughing up the money to pay off B's lender all at once, B can not sell the car back to A. B doesn't have the title to sign over. Best they could do is a handshake agreement where B lets a drive the car and A gives B money. If A decides to stop making payments and won't give the car back, B's choices are to keep making payment to the lender and to call the police and report the car stolen, or to stop making payments and let B's lender repo the car, trashing B's credit in the process.
The transaction does not override the fact that they owe more for the car than it is worth. Friend B would have to put a" large" down payment to be able to finance the vehicle, then friend A would still need to qualify for a loan higher than the vehicle value to be able to buy it back from B. All of the transactions result in sales tax and registration fees so the amount owed would only get greater. Friend A will have to continue to pay the high interest until the loan balance is less than the value.
Yes you can, but friend B is responsible for the loan. So if friend A doesn't make the payments on the car, then friend B is required to make the payments. If neither of them make the payments friend B's credit score will suffer and the car may be repo'd. I would be very wary of doing it.
What's B going to pay for the car? His bank won't finance the upside-down amount that A owes. To deliver title, A would have to come up with the difference.