The way you have chosen to express the rules implies you are assuming a non-monotonic form of reasoning. Rule #1 as stated has no exceptions, while rule #2 expresses an exception to rule #1. In a monotonic system of logic (which includes classical logic) this would lead to a contradiction: if Bob hits Charlie, rule #1 says Charlie may not hit Bob back, but rule #2 says he may. In non-monotonic systems, rules may allow the inference of propositions that hold by default but may be defeated or overriden by the addition of other propositions. In such cases you would need some meta-rules that tell you how to apply the rules. For example, the rules might have some explicit priority value that tells you when one overrides another, or there might be a general consideration that more specific rules override general ones. In your example, rule #1 might then be assumed to hold by default but be defeasible where rule #2 applies, because rule #2 is more specific. You don't need to infer that the rule applies, you only need to check that no defeating conditions are present.
If you wished to avoid using non-monotonic reasoning, an alternative approach would be to attempt to express the obligation in a single rule, e.g. "no man shall hit another man who has himself never hit others". You can then infer that if Charlie is a man who has never hit others, then Charlie should not be hit.
The kind of reasoning we are using here is called deontic logic - the logic of obligation. Obligation can be treated as a propositional modality and attempts have been made to define formal logics for it, though it has proved highly problematic. The Stanford Encyclopedia has an article on deontic logic.