Put P at the origin with the axes along the cube edges into the big cube. The big cube's centre of mass is at 2a(1,1,1), the small cube's at 2b(1,1,1), and O=b(1,1,1).
Treat the removed cube as negative mass:
a3−b3a3⋅2a−b3⋅2b=b⟹a4−b4=2b(a3−b3)⟹a4−2a3b+b4=0.
With X=a/b: X4−2X3+1=(X−1)(X3−X2−X−1)=0. Since X>1:
X3−X2−X−1=0.
(A)