Step 1: Count the contribution of A atoms at corners.
In a cubic unit cell, there are 8 corners.
Each corner atom contributes
\[
\frac{1}{8}
\]
to one unit cell.
Therefore, total number of A atoms is
\[
8 \times \frac{1}{8}=1
\]
Step 2: Count the contribution of B atoms at face centers.
In a cubic unit cell, there are 6 faces.
Each face-centered atom contributes
\[
\frac{1}{2}
\]
to one unit cell.
Therefore, total number of B atoms is
\[
6 \times \frac{1}{2}=3
\]
Step 3: Write the simplest ratio.
The ratio of A atoms to B atoms is
\[
A:B = 1:3
\]
Hence, the formula of the crystal is
\[
AB_3
\]
Step 4: Final conclusion.
Therefore,
\[
\boxed{AB_3}
\]
Hence, the correct option is (3).