The question is primarily about a verification of a solution. So you did just fine addressing the shortcomings of the OPs attempt (+1 from me). If the OP chooses to make another attempt, and includes that into the question body, it is, in my opinion, also fine, but it does create a problem to future readers.
If I had control of all of it, as the asker I would add a horizontal line, separating the 1st attempt from the 2nd. You would then have the option to either do the same, and review the second attempt. Or, simply add a clause that you address the first attempt only. Doing that would safeguard your answer from possible future criticism. Ideally the future readers would be able to see that without such a clause, but some readers may make mistakes.
The OP may overwrite their first attempt with another one. In a classroom setting that would be fine, but here we disprove of such antics. Exactly because it would void your first answer. A new user may do something like that simply because they didn't think through. Should that happen I would simply add the first attempt back to the top (and politely point out the faux pas).
So there is potential for something to go wrong in the future of that thread. All the solution/proof -verification queries suffer from this as well as other maladies (such as answerers jumping in providing their version of solution without discussing the OPs attempt). That may warrant another discussion. Asaf started one in 2018. Don't know if that is the best place to discuss general policies?