This is just my opinion, but my view on homework type questions is generally that they shouldn't be considered off topic, but should also be answered with a degree of care and not answered directly.
Someone with a question about homework may very well have a valid desire for knowledge, same as anyone else using the site. The goal should thus be to provide them with the knowledge they seek without directly giving them the answer to their homework problem.
This is the same approach I use when tutoring someone and they are stuck on a problem. I can explain the necessary information for them to be able to form their own conclusion, but leave the final step of formulating it in to the exact answer as an exercise for the learner to demonstrate that they have grasped what I am teaching them. A degree of care has to be applied to make sure it still is close enough to be an answer, but yet requiring an exercise in understanding on the part of the OP to directly answer their question.
This does have to be carefully approached on SE though as there are two possible cases where questions like this can be common. The first is homework questions, but the other is trying to make canonical Q/As that are generalized and easily discoverable. In the later case, it's best to go ahead and make the last jump to connecting the information directly to the answer.
I suppose a hybrid approach would be to provide an answer initially assuming it is a homework question and then after a time, come back and revisit it with the direct answer. (After the homework would have presumably been due and the direct answer is no longer of value as trying to fake understanding.)