The formula should is X2Z. This is bcoz Z is in ccp which means 8 atoms at corner and 6 at face center so effectively 4 atoms. and x occupy all 8 tetrahedral voids that lie comletely inside lattice so x are effectively 8 atoms. i.e. x8z4 or x2z. Hope u got it else ask me to explain further and please do approve.