The point is that Abū Hāmid’s statement that knowledge of an act is entailed only in the case of a volitional act is correct. This indicates that, if an act is volitional, its agent must know what he does. We therefore infer from his possessing will that he possesses knowledge. This is a sound inference, and it entails that, if the necessary consequence—knowledge—is assumed to be absent, will is absent as well. This too is correct.
Likewise, his statement that knowledge is entailed only in volitional action, not in natural action that is not volitional, is correct: if an act is assumed not to be volitional, its agent need not possess knowledge.
Accordingly, if the agent is assumed to possess knowledge, the act must be volitional, because volitional action entails knowledge, while non-volitional action entails its absence. If the necessary consequence is absent, so is that which entails it; if that which entails it is established, so is the necessary consequence.
Thus, will entails knowledge, and knowledge is a necessary consequence of will. The absence of will entails the absence of knowledge, and the absence of knowledge entails the absence of will.
If knowledge is assumed to be established, this necessarily excludes its contradictory—the absence of knowledge—and what that contradictory entails—the absence of will. When this absence is excluded, its contradictory, namely will, is established.
To clarify: knowledge is a necessary consequence of will, as they stated when they said that everyone who possesses will possesses knowledge. Thus, whoever does not possess knowledge does not possess will. This is what they call contraposition: knowledge is a necessary consequence of will, so when this necessary consequence—knowledge—is absent, that which entails it—will—is absent.