The 25 reps was originally given when the OP accepted your answer and you gained an upvote.
15 points for an answer, 10 points for an upvote = 25 rep.
However - the community considered that this question was a duplicate - it had already been answered by a previous question. Being good citizens we closed the question with a link to the question.
why it was removed
That leaves the dangling answer. Ask Ubuntu receives most of its internet traffic from search engines. When someone is searching for a question, they click on a link and it lands on a Ask Ubuntu page. Stack Exchange sites automatically redirects users to the correct web-page if the question has been closed as a duplicate - BUT only if the duplicate question has no answers.
Thus - being good janitors, your answer was removed - in this case by a moderator but it could equally been removed by high-rep community members.
The answer could have been merged with the duplicate question - however, the answer IMHO did not really substantially offer any new insights that were already covered by the duplicate, so was correctly deleted.
Deleting an answer, removes the unaccept status - thus 15 rep is removed.
For answers that have less than 3 upvotes, the system automatically removes those votes - thus the 10 rep removed.
Its not a bug - just the way Stack Exchange sites work. If you see a question as a duplicate, flag it as such. Pop into chat to discuss with others if required.
It may seem harsh - but dont worry - its just one answer; we've all been there :)