Asking the questioner to post a solution as an answer is the right way. After all separating Qs and As is the style here and we should adhere to ita good first approach.
IfBut you can also do it yourself (for example if the questioner doesn't comply, I would flag ithasn't been active for moderator attention and ask a moderator for separating question and answerwhile).
I would not separate Then the question and answer myself because this feels like a too big intervention.
If nothing happens I wouldshould probably downvotebe community wiki and go on because a question with an answer inside is not really a good questionattribution.