If the linked content is copied verbatim, reject the edit as “copied content”. If you can, write up the solution in your own words as a separate answer, then flag the answer for removal (either as “not an answer” or with a custom flag saying that the link is redundant due to your answer — Stack Overflow moderators can't seem to agree on this).
If the solution comes from the linked site but the writing is original, the best thing to do in such a case is to post a new answer with these explanations. Strictly speaking, you should reject the edit and suggest that the user submit it as a separate answer. However this assumes that the user will see your reject message, which is unlikely since there is no notification of rejected suggestions and they are hard to find even if you know where to look.
If the edit is anonymous, I'd post it as a separate answer, community wiki, credited to an anonymous editor. If it's by a logged-in user, I don't like to do that, because it removes any association between the user and his content. So I would tend to accept the edit, and leave a comment to the editor under the answer (“@bob Thanks for the edit, but since this is your original writing, it would be better to submit this as a separate answer, even if you found the link through this answer.”).