27.12 In a rectangular room, two balls of different sizes are placed in two corners, each ball touching two walls and the floor. If there is a point on each ball such that the distance from the two walls (the walls that the ball touches) to that point is 5 inches, and the distance from the floor to that point is 10 inches, then the sum of the diameters of the two balls is
(A) 20 inches.
(B) 30 inches.
(C) 40 inches.
(D) 60 inches.
(E) There is no definite value according to the given conditions.
(28th American High School Mathematics Examination, 1977)
[Solution] By taking the corner of the room as the first octant of a spatial rectangular coordinate system, a sphere with radius $a$ is tangent to all three coordinate planes, which gives us
$$
(x-a)^{2}+(y-a)^{2}+(z-a)^{2}=a^{2} .
$$

If the point $(5,5,10)$ lies on such a sphere, then we have
$$
2(5-a)^{2}+(10-a)^{2}=a^{2},
$$

which simplifies to
$$
2 a^{2}-40 a+150=0,
$$

or
$$
2(a-15)(a-5)=0 \text {. }
$$

Solving this, we get $a=5$ or 15.
Thus, the radii of the spheres are 5 and 15, and the sum of their diameters is 40.
Therefore, the correct choice is (C).