assume n1 and n2 as the number of moles of nh3 and n2h4 initially
they have given initial pressure at 300 K as 0.5atm,
initial there is a mixture of n2h4 and nh3 so the total number of moles is n1+n2
consider the volume of the mixture initially as V
the volume after they get decomposed is also V .
the same question is there in cengage over there they mentioned that point. that the initial volume of mixture= final volume after geting decomposed here its not mentioned!
From ideal gas equation
0.5*V=[n1+n2]*R*300
After they get decomposed
2 moles of nh3 gives 4 moles
1 mole of n2h4 gives 3 moles, n2 moles of n2h4 would give 3n2 moles
1 mole of nh3 gives 2 moles, n1 moles of nh3 would give 2n1 moles
so therefore total moles after the decomposition is 2n1+3n2
final pressure is 4.5 atm
temperature is 1200K
4.5*V=[2n1+3n2]*R*1200
after solving we get n1=3 and n2=1
percentage of composition of nh3 is 75
and that of n2h4 would be 25