You can't. Only moderators can lock a question.
If you know the answer to an [on topic and appropriate] question and it has not yet been answered, then simply post an answer to the question, so that future readers of the question will have an answer that they can see.
Locking isn't there for questions that have been answered (in comments or otherwise). It's to prevent actions from being taken on a post when there is some form of conflict among community users (either users continually editing a post to change each other's edits, users reopening/closing or deleting/undeleting a question, repeated off topic comments, even after moderators deleting the off topic comments, etc.) to give users a time to resolve the issue in a more appropriate venue and determine the correct course of action through discussion (possibly in meta or chat), rather than constantly changing the post. That's not what's going on here.
If you happen to come across a question where one of the previously mentioned issues is happening, and the post needs to be locked to prevent all community user interactions with it, then all you can do is flag the post and explain to the moderator why the post needs to be locked, and they can lock it if they feel it is merited. But again, there isn't any reason to lock this post here.