The alcohol X must be butan-2-ol because it gives but-2-ene as the major product upon dehydration (according to Zaitsev's rule). But-2-ene, upon bromination, gives 2,3-dibromobutane. Treatment with a strong base like NaNH$_2$ (Y) results in dehydrohalogenation to form but-2-yne. But-2-yne has no terminal hydrogen, so it does not react with sodium metal. Alcoholic KOH would not give the alkyne directly.