A solution is turning blue means, it is turning it's behavior to Basic from Acidic. Reagent D must be a Basic component so it is increasing the pH of the solution. As reaction does not depend on the phase of the component, it could be anything i.e., Solid, Liquid or gas.
Hope this helps!