Switching Relay with NPN and PNP transistors
If you're using Arduino to control the coil, why are you trying to implement a logical AND with BJTs?

Just keep the NPN transistor and write

if(A &amp;&amp; B) digitalWrite(pin, HIGH);
else digitalWrite(pin, LOW);


in your code. A and B should correspond to the activation conditions of the IO pins in your original schematic.