The formula for interest is (Principal)x(Rate of Interest)/365x(Number of days)
You will need to treat each period between payments separately. The first $200 payment was made immediately, so the Principal drops to $1000, the interest rate is .12, and the number of days is 8/1/2007 - 5/22/2007=69 days.
(1000)x(.12/365)x(69) = $22.68
Now do that for the other periods after subtracting the payments first from the interest, then the remainder from the principal.