The pKa values of the given compounds are:
HN3:4.6
HF:3.17
NH3:38
NaH:35
Higher the pKa lower will be the acidic strength. Since the pKa of NH3 and NaH are too high, they are basic in nature. Therefore among the given compounds HF and HN3 are acidic and HF is more acidic.
Option B is correct.