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,
[tex]\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}[/tex]Thus, the fabric's length is 5 inches.