the answer:
according the statement
"Assume p and ~q are both true. ~q → r, and r → ~p. Therefore, ~p and p cannot be true, so p and ~q cannot be true. Therefore, p → q is true."
the answerer has just used theorem between combination of ¬p, p, ¬q and q.
that is called theorem of mathematics logic,
so the proof is D. proof by theorem