Bob sells a stock investment for $45,000 cash, and the purchaser assumes Bob's $32,500 debt on the investment. The basis of Bob's stock investment is $55,000. What is the gain or loss realized on the sale?
A. $10,000 loss
B. $10,000 gain
C. $12,500 gain
D. $22,500 loss
E. $22,500 gain