Usually I askedask the person (in a comment) "Did you mean to ask $this to solve $that".
Depending on his or her rep. I will then point out how to edit the post or edit the post. Often I also leave a comment with "I changed $this to make it clearer. I you disagree you can revert it or use the [edit] link to clarify it further".
If the OP reacts then the post and title will hopefully be in sync.