Darn it, you cheats got before me!
$5000, with an annual interest of a <reasonable> rate of 18%... which you all seem to agree is (18/12)% per month, 18/12 = 1.5, so 1.5% interest per month.
the first month: $5000 + .015 x $5000 - $P = 1.015 x $5000 - P
the second month: 1.015 x (1.015 x $5000 - P) - P = (1.015^2) x $5000 - P x (1 + 1.015)
the third month: 1.015 x (1.015 x (1.015 x $5000 - P) - P) - P = (1.015^3) x $5000 - P x (1 + 1.015 + 1.015^2)
the fourth month: 1.015 x (1.015 x (1.015 x (1.015 x $5000 - P) - P) - P) - P = (1.015^2) x $5000 - P x (1 + 1.015 + 1.015^2 + 1.015^3)
the nth month: (1.015^n) x $5000 - P x (1 + 1.015 + 1.015^2 + 1.015^3 + ..... + 1.015^(n-1))
(1 + 1.015 + 1.015^2 + 1.015^3 + ..... + 1.015^(n-1)) = (1.015^n - 1) / (1.015 - 1) = (1.015^n - 1) / 0.015 = (200/3) x (1.015^n - 1)
n = 48, so 1.015 ^ 48 = 2.0434782893129897282153675440472
((1.015 ^ 48) - 1) = 1.0434782893129897282153675440472
(200/3) x ((1.015 ^ 48) - 1) = 69.565219287532648547691169603145
so,...
the 48th month,
(1.015^n) x $5000 - P x (1 + 1.015 + 1.015^2 + 1.015^3 + ..... + 1.015^(n-1)) = 2.0434782893129897282153675440472 x 5000 - 69.565219287532648547691169603145 x P
At 48 months, the amount needed is zero, so...
2.0434782893129897282153675440472 x 5000 - 69.565219287532648547691169603145 x P = 0
OR...
P = (2.0434782893129897282153675440472 x 5000) / 69.565219287532648547691169603145
P = 146.87499804081104738512338666692
Rounded off to $146.87.
However, I would rather pay $146.88, to ensure the debt is completely clear!
Good problem!
(Are you sure that it's as simple as dividing by 12 to get the compound interest per month?.. I've a gut feeling it's not that simple in real borrowing!)