I'll rewrite your problem with better grammar and punctuation.
I'll also take two zeros off the end of your numbers to make
it more realistic. It's more realistic to have borrowed ten
dollars and five dollars than to have borrowed one thousand
dollars and five hundred dollars. After all, nobody buys three
hundred dollars worth of sweets!
I borrowed $10 from a friend, but I lost it. So I borrowed $5
from another friend. From that $5, I bought $3 worth of sweets.
With the remaining $2, I paid each friend back $1. So I owe
$9 +$4 = $13.
That should be the end of the story. You borrowed $15 and paid
back $2. So you owe $13. $9 to the first friend and $4 to the
second friend. The $13 that you owe is $10 that you lost and $3
that you spent for sweets. But then the story continues with a
mistake:
Well with $13, add the $3 I spent for sweets will be $16.
No, no! That's bad math to add that! Add the $2 you paid them
back and get $15. What you owe for the sweets is part of the
$13 that you owe. It is wrong to add that $3 to the $13 that
already includes it! Also you are ignoring the $2 that you
paid back. So your mistake was that instead of adding the $2
you still owe to the $13 and get the $15 that you borrowed, you
wrongly added $3 again which is part of the $13, and got $16,
and ignored the $2 you paid back.
So I owe $9 +$4 = $13. Well with $13 add the amount for the
sweets of $3 and get $16. I only borrowed $15 from my friends.
Where did the extra $1 come from?
What tricks you is the fact that you think you have added in the
$2, but you haven't, you have subtracted it instead. That's where
the $13 came from, $15-$2. What else tricks you is that you think
you haven't included the $3 you spent for sweets. That's because
you didn't say anything about the sweets when you did your bad
math, but it was already included in the $13 that you still owe,
$10 for what you lost and $3 for the sweets. So it makes no sense
to add the $3 for sweets again to the $13 that contains it!
Edwin