The coefficient z is equal to 8.
from balanced equation if x is 2, it means there are number of P atoms is 8 and in balanced equation number of atoms in reactants and products are equal. So if z is 8 than there is number atoms in reactants and products is 8.