a) Neither solution will turn blue litmus red.
Solution P is sodium chloride, formed from a strong acid, hydrochloric acid (HCl), and a strong base, sodium hydroxide (NaOH). When sodium chloride is dissolved in water, it gets hydrolysed to give equal amounts of hydroxide and hydrogen ions, which makes its aqueous solution neutral. Therefore, the solution of sodium chloride will have no effect on red or blue litmus paper.
b) Sodium hydroxide solution (Q) will turn red litmus blue, because solution Q is basic.