The 0.15 in that case should be divided by 12 as the period is in months and the interest rate is per annum.
Right answer though, so just an oversight.
Really depends on the loan. That is correct when the loan is paid off as 1 lump sum at the end of the term. If it is an amortising loan the calculation differs because the capital balance reduces each month. As far as I know there is no closed-form solution to the total interest paid on an amortising loan so you would need to work out the interest paid per period.
Knowing why you are trying to work this out would be helpful.