Here the interest would be i = P*r*t, or, specifically,
interest on loan = i = ($500)(0.15)(4 yrs) = $300.
This assumes just ONE repayment: $300 plus $500, or $800, after 4 years. It's much more common to repay a loan like this with monthly payments.