Key idea: A NAND gate with both inputs tied together is a NOT gate. Use De Morgan's law for the last gate.
- The first gate gives A⋅A=Aˉ, and the second gives B⋅B=Bˉ.
- The final NAND gives
X=Aˉ⋅Bˉ=Aˉˉ+Bˉˉ=A+B
- So the combination behaves as an OR gate.
Answer: (A) OR gate