Step 1: Use density formula for unit cell.
Density of a crystal is given by
\[
\rho=\frac{Z\times M}{N_A\times a^3}
\]
where
\[
Z=\text{number of atoms per unit cell}
\]
\[
M=\text{molar mass}
\]
\[
N_A=\text{Avogadro number}
\]
and
\[
a=\text{edge length of unit cell}
\]
Step 2: Write \(Z\) values for fcc and bcc.
For element A, structure is fcc, so
\[
Z_A=4
\]
For element B, structure is bcc, so
\[
Z_B=2
\]
Both have the same edge length,
\[
a_A=a_B=3\mathring{A}
\]
Step 3: Use the given condition about number of atoms.
The number of atoms in
\[
210\,g
\]
of A is equal to the number of atoms in
\[
594\,g
\]
of B.
Number of atoms is proportional to
\[
\frac{\text{given mass}}{\text{molar mass}}
\]
So,
\[
\frac{210}{M_A}=\frac{594}{M_B}
\]
Rearranging,
\[
\frac{M_B}{M_A}=\frac{594}{210}
\]
\[
\frac{M_B}{M_A}=2.82857
\]
Step 4: Relate densities of A and B.
Since both have the same edge length,
\[
\rho \propto ZM
\]
Therefore,
\[
\frac{\rho_B}{\rho_A}=\frac{Z_BM_B}{Z_AM_A}
\]
Substituting values,
\[
\frac{\rho_B}{7}=\frac{2\times M_B}{4\times M_A}
\]
\[
\frac{\rho_B}{7}=\frac{1}{2}\times \frac{M_B}{M_A}
\]
\[
\frac{\rho_B}{7}=\frac{1}{2}\times 2.82857
\]
\[
\frac{\rho_B}{7}=1.414285
\]
\[
\rho_B=7\times 1.414285
\]
\[
\rho_B\approx 9.9\,g\,cm^{-3}
\]
Step 5: Final conclusion.
Therefore, the density of B is
\[
\boxed{9.9\,g\,cm^{-3}}
\]