Answer
a) $(\neg p \lor ¬ q)$
b) $\neg(p \lor ((¬ p) \land q))$
Work Step by Step
a) Starting from the left.
First, the output of the top Not gate is : ¬ p
The output of the bottom Not gate is: ¬ q.
The output of the OR gate is ($\neg$ p $\lor$ ¬ q).
Therefore the output of this circuit is
$$(\neg p \lor ¬ q).$$
b) The output of the middle Not gate is: ¬ p.
Then, the output of the bottom AND gate is: (¬ p) $\land$ q
The output of the OR gate is: p $\lor$ ((¬ p) $\land$ q).
Finally the output of the Not gate is:
$$\neg(p \lor ((¬ p) \land q))$$