First let’s recall a few laws.
- definition of implication: $a\implies b \equiv \lnot a \lor b$
- DeMorgan's Laws:
- $a \lor b \equiv \lnot(\lnot a \land \lnot b)$
- $a \land b \equiv \lnot(\lnot a \lor \lnot b)$
- Commutation:
- $a \lor b \equiv b \lor a$
- $a \land b \equiv b \land a$
- Association:
- $(a \lor b) \lor c \equiv a \lor (b \lor c)$
- $(a \land b) \land c \equiv a \land (b \land c)$
- Distribution:
- $a \lor (b \land c) \equiv (a \lor b) \land (a \lor c)$
- $a \land (b \lor c) \equiv (a \land b) \lor (a \land c)$
- Idempotency:
- $a \lor a \equiv a$
- $a \land a \equiv a$
- Identity:
- $a \lor \bot \equiv a$
- $a \land \top \equiv a$
- Zero:
- $a \lor \top \equiv \top$
- $a \land \bot \equiv \bot$
Starting with the RHS and working backward,
\begin{align}
\lnot((p \land \lnot r) \land \lnot q) &\land \lnot(r \land (\lnot q \land p))\\
\lnot(p \land \lnot q \land \lnot r) &\land \lnot(p \land \lnot q \land r) \quad\text{Association and Commutation}\\
(\lnot p \lor q \lor r) &\land (\lnot p \lor q \lor \lnot r) \quad\text{DeMorgan}\\
((p \implies q) \lor r) &\land ((p \implies q) \lor \lnot r) \quad\text{dfn. of impl.}\\
(p \implies q) &\lor (r \land \lnot r) \quad\text{Distribution}\\
(p \implies q) &\lor \bot \quad\text{dfn. of Contradiction}\\
p &\implies q \quad\text{Identity}\\
\end{align}
Now starting with the LHS and working forward,
\begin{align}
(p \implies q) &\lor (q \land r)\\
((p \implies q) \lor q) &\land ((p \implies q) \lor r) \quad\text{Distribution}\\
((\lnot p \lor q) \lor q) &\land ((p \implies q) \lor r) \quad\text{dfn. of impl.}\\
(\lnot p \lor q) &\land ((p \implies q) \lor r) \quad\text{Associativity and Idempotency}\\
(p \implies q) &\land ((p \implies q) \lor r) \quad\text{dfn. of impl.}\\
((p \implies q) \lor \bot) &\land ((p \implies q) \lor r) \quad\text{Identity}\\
(p \implies q) &\lor (\bot \land r) \quad\text{Distribution}\\
(p \implies q) &\lor \bot \quad\text{Zero}\\
p &\implies q \quad\text{Identity}\\
\end{align}
Therefore both the LHS and RHS are logically equivalent to $p \implies q$, and by Transitivity of equivalence, the LHS and the RHS are logically equivalent to each other.