Atoms of element B form a ccp lattice and those of the element A occupy 2/3rd of the tetrahedral voids, the formula of the compound is:
A4B3
Number of close packed spheres = n
Number of tetrahedral voids = 2n
Only 2/3 are occupied by the atoms of element A. Hence the formula of the compound is A4B3.