The atoms in the corner contribute 18 to the unit cell.
seven of the corners are occupied by A atoms
Hence number of atoms per unit cell = 7×18=78
The atoms in the faces contribute 12 to the unit cell. There are six faces.
Hence number of B atoms per unit cell = 6×12=3
Hence the formula is
A78B3 or general formula is A7B24
The total number of atoms = 31