Good question, and you might be interested in What to do when someone posts an exact same answer after your answer? over on the siteSE-wide Meta.
Although I don't have a one-size-fits-all answer, I do have two general approaches:
- Try to be generous and understand how this answer might offer something new. If there is—maybe an explanation as it pertains to a different genre, a different way of explaining it, connecting it to another concept, etc.—then I'll typically upvote and move on my way. I think this is one of the strengths of SE: the ability to have multiple good and correct answers.
- Otherwise, if it doesn't apply to the above point or any points in the linked Meta post, I'll downvote it. This is especially the case when it's a one-sentence answer from a long-time user that should know better. Depending on the circumstances, it could be best to flag it and treat it as a comment to an existing answer.