Question about the current flow and voltages in a simple NAND diagram
If B is turned off then its collector is effectively open circuit and there is nowhere for A's Base-Emitter current to go, so it cannot turn on. 

With both A and B turned off there is no current flow through the resistor, so output voltage equals Vcc.