You might have to ask yourself, from a philosophical standpoint, what is a question? and what is an answer?.
Probably the closed post is not the kind of question, understanding this as the "original post" / "initial post" of a "discussion thread", that the site/community wants but independently of that you might want to help the OP by gifting them an answer independently of the limitations that comments might have. If that is the case, go ahead.
From Pekka's answer to General policies on answering closed questions in the comments?
Answering a closed question, or giving hints where to find an answer, in comments is almost always okay, no matter what the question is about.
On the other hand, if you are looking to help the community fulfill its purpose, you should first check out the corresponding site tour and the corresponding per-site/child meta.
Please, do your best to understand the community's purpose and the community's workings and act according to them.
Many people come to Stack Exchange thinking that the button label "Ask Question" is just a generic label as it happens on many other places on The Web. Many assume that the on-screen help/guidance is just a collection of words that could be ignored without any consequence. Some assume that it's not needed to spend time understanding the site, they assume that the "the site" should understand them.
Remember that Stack Exchange sites are not discussion forums, they don't hold discussion threads, they are "question and answer" sites but not for questions and answers in a broad sense, they are sites intended to be used for a specific way to ask questions and for a specific way to answer those questions.
It's on you how you spend your time on the site / Stack Exchange network, you might take a "hit and run" approach, or you might look at each site as a community garden where the community collaborates to keep them clean and healthy.