As the 'A' turns red litmus blue it is a base. Now the gas 'A' combines with 'B' in presence of Catalyst to give colorless gas Nitrogen monoxide. It reacts with oxygen to give brown gas which is Nitrogen dioxide.
NH3 in water forms NH4OH which turns red litmus blue.