Answer
$42\Big(\frac{h^2}{8mL^2}\Big)$
Work Step by Step
The quantized energies for an electron trapped in a three-dimensional infinite potential well that forms a e rectangular box are
$E_{nx,ny,nz}=\frac{h^2}{8m}\Big(\frac{n_x^2}{L_x^2}+\frac{n_y^2}{L_y^2}+\frac{n_z^2}{L_z^2}\Big)$,
where m is the electron mass and $n_x$ is a quantum number for well width$ L_x$, $n_y$ is a quantum number for well width $L_y$ and $n_z$ is a quantum number for well width $L_z$.
In this problem, the electrons are contained in a cubical box of widths $L_x=L_y=L_z=L$.
$\therefore\;\;E_{nx,ny,nz}=\frac{h^2}{8mL^2}\Big(n_x^2+n_y^2+n_z^2\Big)$
According to the current problem, there are $8$ electrons confined to the cubical box. As the electrons do not electrically interact with one another, we can determine the ground state configuration of the system by placing the seven electrons in the corral one by one by maintaining the Pauli exclusion principle; that is, no two electrons can have the same set of values for their quantum numbers $n_x$, $n_y$, $n_z$, and $m_s$.
$(i)$ First, the electrons will go into the lowest energy level $E_{1,1,1}$, According to the Pauli exclusion principle, two electrons can accommodate in the energy state $E_{1,1,1}$. Thus the energy level $E_{1,1,1}$ will be fully occupied by two electrons with quantum numbers $(n_x,n_y,n_z,m_s)$ of $(1,1,1,-\frac{1}{2})$ and $(1,1,1,\frac{1}{2})$.
$(ii)$ Thereafter, the electrons will go into next higher energy state with is 3 fold degenerate: $(2,1,1)$, $(1,2,1)$ and $(1,1,2)$. Thus, the energy level $E_{2,1,1}$, $E_{1,2,1}$ and $E_{1,1,2}$ will be fully occupied by the remaining $6$ electrons with quantum numbers $(n_x,n_y,n_z,m_s)$ of $(2,1,1,-\frac{1}{2})$, $(2,1,1,-\frac{1}{2})$, $(1,2,1,-\frac{1}{2})$, $(1,2,1,-\frac{1}{2})$, $(1,1,2,-\frac{1}{2})$, and $(1,1,2,-\frac{1}{2})$
Now, the total energy $E_{gr}$ is the sum of the energies of the individual electrons in the system’s ground-state configuration. Therefore,
$E_{gr}=2E_{1,1,1}+2E_{2,1,1}+2E_{1,2,1}+2E_{1,1,2}$
or, $E_{gr}=2\times3\Big(\frac{h^2}{8mL^2}\Big)+2\times6\Big(\frac{h^2}{8mL^2}\Big)+2\times6\Big(\frac{h^2}{8mL^2}\Big)+2\times6\Big(\frac{h^2}{8mL^2}\Big)$
or, $E_{gr}=42\Big(\frac{h^2}{8mL^2}\Big)$
$\therefore$ The energy of the ground state of the system is $42\Big(\frac{h^2}{8mL^2}\Big)$