(a) A and B are the inputs and Y is the output of the given circuit. The left half of the given figure acts as the NOR Gate, while the right half acts as the NOT Gate. This is shown in the following figure.

Hence, this circuit functions as an OR Gate.
(b) A and B are the inputs and Y is the output of the given circuit. It can be observed from the following figure that the inputs of the right half NOR Gate are the outputs of the two NOT Gates.

Hence, this circuit functions as an AND Gate.