Various ways of doing this. Going the Future Value way:

FV of Purchasing:

FVP = a(1+r)^n - 10000 ; a = 125000, r = .09, n = 10

FV of Leasing (involves annuity immediate formula):

FVL = q*p*(q^n - 1) / r ; p = 18000, r = .09, q = (1 + r) = 1.09, n = 10

Compare FVP and FVL

If you can't wrap this up now, you need help from your math teacher Jomo.