Cheherazad, the carpet salesman, has bought a rectangular piece of carpet. Unfortunately, Cheherazad's has lost his tape measure and he has no other measuring instruments. However, he finds that if he lays the carpet flat on the floor of his smaller rectangular (38 feet by 55 feet) storeroom, then each corner of the carpet touches a different wall of that room. Also if Cheherazad lays the carpet flat on the floor of his larger rectangular (50 feet by 55 feet) storeroom, each corner of the carpet touches a different wall of that room. What are the carpet dimensions?

• Not to poke holes, but are we to assume that all rooms are rectangles, as well? Also, what does "a different wall" mean? Wouldn't they be different walls, if they're part of a different storeroom? – Khale_Kitha Mar 11 '16 at 14:06
• Every storeroom is rectangular. Every storeroom has four different wall. The carpet has four corners. Every corner of the carpet touches a different wall of the smaller storeroom. Every corner of the carpet touches a different wall of the larger storeroom. – D.A.G. Mar 11 '16 at 14:21
• In other words, rotating the carpet will fit in two different rectangle. What size of carpet can fit in both rectangles is the question you must answer. – Trenin Mar 11 '16 at 14:41
• Yep - just had to make sure the question could be answered. It couldn't answered without that assumption. – Khale_Kitha Mar 11 '16 at 15:03

(1). We denote the width and length of the carpet by $x$ and $y$.

(2). Assume that the carpet $EFGH$ lies in the rectangular storeroom $ABCD$, with corner $E$ on wall $AB$, corner $F$ on $BC$, corner $G$ on $CD$, and corner $H$ on $DA$. Then $$\Delta AEH ~\equiv~ \Delta CGF ~\sim~ \Delta BFE ~\equiv~ \Delta DHG,$$ where $\equiv$ denotes congruence and $\sim$ denotes similarity. Let $k=y/x$, $|AE|=a$ and $|AH|=b$. This implies $|BE|=kb$ and $|DH|=ka$.

(3). The data of the first storeroom now yields with (2) that $a+kb=50$ and $ka+b=55$, which can be rewritten as $a=(55k−50)/(k^2−1)$ and $b=(50k−55)/(k^2−1)$. This leads to $x^2 = a^2+b^2 = (5525k^2−11000k+5525)/(k^2−1)^2$, and hence to $$x^2(k^2−1)2 ~=~ 5525k^2−11000k+5525.$$

(4). Similarly, the data of the second storeroom yields with (2) that $$x^2(k^2−1)2 ~=~ 4469k^2−8360k+4469.$$

(5). By combining the two equations in (3) and (4) we get $5525k^2−11000k+5525 = 4469k^2−8360k+4469$, which implies $k=2$ or $k=1/2$. Without loss of generality we have $y=2x$ and $a+2b=50$ and $2a+b=55$.
Then $a=20$ and $b=15$, which implies $x=\sqrt{15^2+20^2}=25$ and $y=50$.

Summarizing,

the carpet is $25$ feet by $50$ feet.

Lets assume the carpet is $X \times Y$. There are two angles $\theta$ and $\phi$, so that when the carpet is rotated by them, it can be inscribed inside another rectangle as stated in the problem.

When rotated by $\theta$, the width changes to $X \cos{\theta} + Y \sin{\theta}$ and the height changes to $X \sin{\theta} + Y \cos{\theta}$. Therefore, we know that:

$$X \cos{\theta} + Y \sin{\theta} = 38$$ $$X \sin{\theta} + Y \cos{\theta} = 55$$

Similarly for $\phi$ except we don't know which is the length or height, so we know one of the following must be correct:

$$X \cos{\phi} + Y \sin{\phi} = 50$$ $$X \sin{\phi} + Y \cos{\phi} = 55$$

Or

$$X \cos{\phi} + Y \sin{\phi} = 55$$ $$X \sin{\phi} + Y \cos{\phi} = 50$$

Using wolframalpha, we get that $X=25$, $Y=50$ are the dimensions of the carpet.