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:
Should I answer the question which is the duplicate of another question?Should I answer the question which is the duplicate of another question?
and the faq:
How does duplicate closing work? When is a question a duplicate, and how should duplicate questions be handled?How does duplicate closing work? When is a question a duplicate, and how should duplicate questions be handled?