This is a case where an edit to their question has stranded your answer to their original question. The same edit has included an answer in the area reserved for questions.
The solution to both situations is to rollback their edit which I will do now. I have not checked to see whether you have the privilege to do this too but I would expect that you do.
This will make the question no longer a duplicate so I will re-open the question.
The asker can then choose whether to self-answer their own question to say something along the same lines as "when I looked closer I realized what had happened was … and was pointed at the solution for this in an answer at ...". They may then choose to move or remove their accept checkmark from your answer, and you will then be able to decide whether to delete or leave it. At that time it will be an answer to the original question so I see no need to delete it.