Shows octahedron-cube relation. Arrow keys rotate it. Can you calculate size of small cube? You can turn off labels of x y z coordinates of vertices.
6 vertices of octahedron touch 6 faces of outer cube. Inside octahedron, a smaller each of cube's 8 vertices touch the center of one of the octahedron's 8 faces. If you were to slice off corners of cube you'd get a octahedron. I realized this when beveling cube corners to make octahedron in Blender. You could also fit the cube inside the octahedron. The xyz labels help see how to connect vertices when you code. Can you figure out the logic for calculating smaller cube?