One suggestion which would have kept you from having this issue in the first place:  If you know that a question is a duplicate, rather than answering it, simply vote to close as a duplicate question (or flag it as a duplicate if you don't have the reputation) and move on.  This points other people who find the question as well as the OP to the correct answer.

For more advice on how to handle duplicates, see:  
https://meta.stackexchange.com/q/118658/226446  
and the faq:  
https://meta.stackexchange.com/q/10841/226446