(N/A) When part $A$ is heated,iron and sulphur react to form iron sulphide $(FeS)$:
$Fe + S \rightarrow FeS$
When dilute hydrochloric acid $(HCl)$ is added to the iron sulphide $(FeS)$,hydrogen sulphide $(H_2S)$ gas is evolved:
$FeS + 2HCl \rightarrow FeCl_2 + H_2S$
Hydrogen sulphide gas has a characteristic foul smell,similar to that of rotten eggs.
When dilute hydrochloric acid is added to the unheated mixture of iron and sulphur (part $B$),iron reacts with the acid to release hydrogen $(H_2)$ gas,while sulphur remains unreacted:
$Fe + S + 2HCl \rightarrow FeCl_2 + H_2 + S$
Hydrogen gas is identified by bringing a burning matchstick near it,which causes the gas to burn with a characteristic 'pop' sound.