Headers and bodies on good questions agree. In this case the answer you're talking about answers the bit of info in the header, a problem statement which can be construed to be a question quite easily, without much of a stretch. It does indicate the person answering probably didn't read the entire question.
The original question can and should be modified such that the header agrees with the question in the body. The answerer probably could have made a comment with their partial answer.
This is not a rare case, but it is a case where one minor issue existed, and another minor issue was added as a result. The info in the answer is good, even if it isn't perfectly matched to the problem. Some coaching comments would help both improve their own parts of this, but overall, given that the partial answer IS a decent answer, even if it is only tangentially related to the issue, and it answers SOMETHING from the main post, I don't consider this particular case to be worth downvotes or close/delete votes.