Help with calculating ROI for a margin loan

QUESTION : The following data pertain to a margin purchase of a stock by an investor : Stock’s purchase price $50/share Sale price $55/share Shares purchased 500 Margin 45% Call money rate 6% Dividend $1.80/share Transaction commission on purchase $0.05/share Transaction commission on sale $0.05/share If the stock is sold exactly one year after the purchase, the total return on the investor’s investment is closest to: A. 14%. B. 19%. C. 22%.

ANSWER : C is correct. Proceeds on sale: $55 x 500 = $27,500 _ Less payoff loan: $50 x 500 x 0.55 = –$13,750 _ Less margin interest paid: $13,750 x 0.06 = –$825 Plus dividend received: $1.80 x 500 = $900 Less sales commission paid: $0.05 x 500 = –$25 Remaining equity = Sum of the above = $13,800 Initial investment (including commission): ($50 x 500 x 0.45) + ($0.05 x 500) = $11,275 Return on the initial investment: ($13,800 – $11,275)/$11,275 = 22.4% My question is why do we have the bolded “Less payoff loan: $50 x 500 x 0.55 = –$13,750” part? In similar questions from other papers, the “Purchase price x Number of shares” was the amount subtracted from “Proceeds on Sale”…but in this question, the amount being subtracted is just the loan portion of the purchase

A margin of 45% means that you use your own equity up to 45% of the transaction value ($50 x 500 x 0.45) while the rest are financed through debt ($50 x 500 x 0.55). If you use no debt at all, then the “Purchase Price x Number of Shares” will be subtracted instead of the loan amount.

We need to understand the concept that to calculate ROI we should calculate our return nett after we paid off the debts before dividing it with our initial investment.