Consider the following schematic diagram,
Note that the diagonal cut will divide the rectangle into two congruent right triangles.
The right triangle has the hypotenuse 5 inches and width 3 inches, so the length can be calculated using Pythagoras theorem as follows,
![\begin{gathered} \text{ Hypotenuse}^2=\text{Length}^2+\text{Width}^2 \\ 5^2=\text{Length}^2+\text{3}^2 \\ \text{Length}^2=5^2-3^2 \\ \text{Length}^2=25-9 \\ \text{Length}^2=16 \\ \text{Length}=\sqrt[]{16} \\ \text{Length}=4 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/kpg2gsi8mq3iaggu5krhehsscta798i201.png)
Thus, the fabric's length is 5 inches.