Thank you for reporting, we will resolve it shortly
Q.
The combination of NAND gates shown here under figure, are equivalent to
Semiconductor Electronics: Materials Devices and Simple Circuits
Solution:
For first case, the Boolean expression is, $Y=\overline{\bar{A} \cdot \bar{B}}=A+ B$ hence for OR gate and for second case, the Boolean expression is $Y=\overline{\bar{A} \cdot \bar{B}}=A \cdot B$, and hence for AND gate.