The equation is already balanced in the question, but to reach this we must first assume that all chemicals are in a 1:1:1 molar ratio:
NaN3(s) --> Na(s) + N2(g)
Then we count the number of each atom on each side of the reaction:
Atom Left hand side Right hand side
Na 1 1
N 3 2
Clearly this is not balanced in terms of N, so to balance this we need to make it so the number of N atoms is the lowest common multiple of 2 and 3, which is 6. Therefore, we use 2 moles of NaN3 and 3 moles of N2 to get 6 N atoms on each side:
2NaN3(s) --> Na(s) + 3N2(g)
Counting atoms:
Atom Left hand side Right hand side
Na 2 2
N 6 6
Therefore this balances for all atoms and is the correct balanced equation.
Hope this helps!