We know that: Q=mL,Q=msΔθ
Given: swater=1 cal/g∘C,Lf=80 cal/g,Lv=540 cal/g
Available heat : 5 g steam (100∘C)
Q=mL=5×540=2700 cal
Required heat : 10 g ice (0∘C)
Q=mL=10×80=800 cal
10 g water (0∘C)
Q=ms(100−0)
=10×1×(100−0)
=1000 cal
So available heat is more than required heat, therefore final temperature will be 100∘C.
Mass of steam condensed
m=QL=800+1000540=103 g
Total mass of steam
=5−103=53 g
Comparing with pq we get,
p=5,q=3
p+q=5+3=8
Final answer: 8.