Does a non-terminal alkyne react with sodamide?
By the given question conditions you should easily guess that $(A)$ is $\ce {Hex-2-yne}$. When it is reacted with $\ce{NaNH_2}$ in presence of heat it can isomerise to terminal alkyne by following this mechanism and then $\ce{CH_3I}$ addition will simply follow an $\ce{S_N2}$ mechanism.



Secondly,Ozonolysis will yield an aldehyde which can get oxidised to acid in oxidative medium.