38. Two congruent spheres are inscribed in opposite trihedral angles of a cube and touch each other. Calculate the volumes of the spheres if the length of the edge of the cube is $a$.
38. To construct tangent spheres inscribed in opposite trihedral angles of a cube, consider the diagonal section of the cube $A A^{\prime} C^{\prime} C$ (Fig. 116). The spheres can be constructed using the method of homothety. From the similarity of triangles $A A^{\prime} C^{\prime}$ and $O P C^{\prime}$, we obtain:

$$
\frac{r}{a}=\frac{\frac{d}{2}-r}{d} ; \frac{r}{a}=\frac{d-2 r}{2 d}
$$

Here, $d=a \sqrt{3}$ is the length of the cube's diagonal. From the obtained proportion, we find: $2 d r=a d-2 a r ; 2 a r \sqrt{3}=a^{2} \sqrt{3}-2 a r ; r=\frac{a \sqrt{3}}{2(\sqrt{3}+1)}$. Knowing $a$, we can calculate the volume of each sphere using the formula $V=\frac{4}{3} \pi r^{3}$.