Problem:
Four cubes with edge lengths 1,2,3, and 4 are stacked as shown. What is the length of the portion of XY contained in the cube with edge length 3?
Answer Choices:
A. 5333​​
B. 23​
C. 3233​​
D. 4
E. 32​
Solution:
Label vertices A,B, and C as shown. Note that XC=10 and CY=42+42​=42​. Because △XYC is a right triangle, XY=102+(42​)2​=233​. The ratio of BX to CX is 53​, so in the top face of the bottom cube the distance from B to XY is 42​⋅53​=5122​​. This distance is less than 32​, so XY pierces the top and bottom faces of the cube with side length 3. The ratio of AB to XC is 103​, so the length of XY that is inside the cube with side length 3 is 103​⋅233​=(A)5333​​​.
OR
Place the figure in a 3-dimensional coordinate system with the lower left front corner at (0,0,0),X=(0,0,10), and Y=(4,4,0). Then line XY consists of all points of the form (4t,4t,10−10t). This line intersects the bottom face of the cube with side length 3 when 10−10t=4, or t=53​; this is the point (512​,512​,4), and because 512​<3, the point indeed lies on that face. Similarly, line XY intersects the top face of the cube with side length 3 when 10−10t=7, or t=103​; this is the point (56​,56​,7). Therefore the desired length is