Aruna, let's work backward. We are going to say Jamie starts with $5 and gains $2 per day, while Kelvin starts with nothing and gains $5 a day. Remember that the ending amounts are $40 apart. Both starting amounts are multiples of 5, since Kelvin spends $5/day and any multiple of 5 minus 40 is still a multiple of 5.
5, 7, 9, 11, 13, 15. There's 5 days of adding $2, but 15 + 40 = 55 and 55/5 = 11 and not 5.
17, 19, 21, 23, 25. That's 10 days of $2, but 25 + 40 = 65 and 65/5 = 13.
27, 29, 31, 33, 35. That's 15 days of adding $2, 35 + 40 = 75, and 75/5 = 15
So, it took 15 days, and Kelvin started with $75.
Hope this helps!