Proof of the equivalence of two Prolog rules with the same left side to one rule with a disjunction

Factor out n(D) using a distributive law of or's (disjunctions) over and's (conjunctions):

Try to guess the next step in creating a single Prolog rule with the equivalent meaning, then click here.