Just being nitpicky here: but I believe N3- is an azide with a -1 charge, not a nitrogen ion with a -3 charge.
OP--the short answer is the periodic trends will predict basicity. Base strength increases going up and to the left on the periodic table. So nitrogen will be more basic than oxygen.
Long answer: oxygen is more electronegative than nitrogen. So O will be more stable with the negative charge than nitrogen. Therefore, the azide, being unhappy with the negative charge, wants to pick up a proton more than the hydroxide. So, azide is more basic. In general, comparing basicity within the same row, you take electronegativity into consideration.
Let's also compare hydroxide (OH-) and bisulfide (SH-). Which is more basic? Well, even though O is more electronegative than S, sulfur is much BIGGER than oxygen. The bigger size of sulfur allows it to accomodate an extra electron better than oxygen. In other words, the negative charge on S is more stable because it has MORE ROOM (in a sense, it is more delocalized). Because SH- is more stable than OH-, the hydroxide will want to pick up a proton and become neutral and it will be more basic. In general, comparing basicity within the same column, you take size into consideration.
This explains why we have this periodic trend.