Ok so I am not able to completely get the answers I will just type what I got. Maybe it will help you.
P could be SO32- cuz it gives Zn+ HCl test to form H2S which is Q and is also a gas as indicated.
H2S with KMnO4 will get R = S
H2S with ferric chloride gives S + coloured ion Fe+2
So T Fe+2