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,
Thus, the fabric's length is 5 inches.