There are 2 tetrahedral sites per atom of B because atoms of element B have ccp arrangement. There are 2 atoms of element A for each atom of element B because all tetrahedral sites are occupied by atoms of element A. Therefore, the formula of the compound is A2B.