According to NaCl structure
so 'A' occupies 8 corners of the cubic unit cell which contribute 1/8 each to this cube
therefore 8*1/8 = 1
also 6 face centered atoms contribute 1/2 to this cube
therefore 6*1/2=3
Therefore total contribution of atom'A' is 4
Now B occupies octahedral voids(NaCl structure) which contribute 1/4
therefore 1+12*1/4 = 4
So the formula is A4B4 or AB
Now you are removing all the face centered atoms along one axis(any axis origin at centre of cube)
so the number of atoms removed from cube are 2
so contribution from 'A' remains 8*1/8(corner atoms) + 4*1/2(facecentered atoms) = 3
so the resultant becomes A3B4