Your rep log indicates that you lost 23 point for the deletion, not 25. The other 2 lost rep are from the downvote.
We can tabulate this out by summing the answer's pre-deletion reputation events:
+10 upvote
+15 accept
- 2 downvote
------------
+23 pre-deletion worth
When the answer was deleted, you lost the total value of the question's reputational worth to you, which was 23 rep.
To put it another way:
- Suppose I gave you 25 dollars.
- The next day, I need money to buy my lunch, so I say, "Sorry, can I just get 2 of those dollars back from you?"
- The day thereafter, I realize I meant to give those 25 dollars to someone else entirely, so I say, "Terribly sorry, but please give all of that money back. That shouldn't have gone to you at all."
When I take back the money, I'm certainly not going to ask for the full $25 back, because you already gave me $2 of it the day before. Thus, on the final day, you give me $23, but your net loss (counting from the first day) was $25, including the other $2.