Zn(OH)2 is precipitated so, to make the basic solution, the agent must be XH3 -> X must be nitrogen
This logic doesn't make any sense, even if X seems to be nitrogen. No connection between solution basicity and X identity.
Let's start with the original reaction equation, as posted by munchkiness:
Zn
3X
2(s) + 2H
2O(l) = 3Zn
2+(aq) + OH
-(aq) + ZXH
3(g)
First of all - it is not balanced yet, and there is something wrong on the far right - no idea what ZXH
3. But let's just ignore it. Your products are more or less correct - and as vhpk correctly signalled, you have Zn
2+ and OH
- in the same solution, knowing a little bit about solubilites you should be able to identify that they will immediately form insoluble Zn(OH)
2.
The simplest approach to identify X is to look at the second row of the periodic table and at the Zn
3X
2 formula. We know Zn is divalent, there are three Zn atoms, so they hava 6 bonds. The same number of bonds must be created by 2 atoms of X. This means X is trivalent. Which non-metals can be trivalent? Only those from 5
th column. There is only one element that is both in 5
th column and 2
nd period. And if you take a look at its chemical properties you will see that zinc nitride and ammonia fit the question perfectly.
If you will look further, you will find that the reaction of zinc nitride and water doesn't yield Zn(OH)
3... But that's a lesson on using Google and wikipedia.