An aqueous solution of metal nitrate P reacts with sodium bromide solution to form yellow ppt of compound Q which is used in photography. Q on exposure to sunlight undergoes decomposition reaction to form metal present in P with reddish brown gas. Identify P&Q. Write the chemical reaction and the type of chemical reaction.