Find the volume of the rectangular prism as if there wasn't a gap, then find the volume of the gap and subtract it.
[tex]\sf V=lwh[/tex]
[tex]\sf V=(12)(6)(8)[/tex]
[tex]\sf V=576in^3[/tex]
Now the gap:
[tex]\sf V=lwh[/tex]
[tex]\sf V=(2)(6)(6)[/tex]
[tex]\sf V=72in^3[/tex]
Subtract the two volumes to find the volume of the entire figure:
[tex]\sf 576-72=\boxed{\sf 504in^3}[/tex]