Answer: Approximately 3.42857142857142 inches
Round this value however you need to. For instance, if you need to round to 2 decimal places, then the answer would be 3.43 inches.
====================================================
How I got this answer:
A square has side lengths that are the same value and it has four right angles. For example, a square could have all four sides equal to 7 inches. We want this square to fit snugly inside a right triangle. Put another way, we want this square as big as possible without it overflowing outside the triangle.
If one vertex of the square is at (0,0) then the opposite vertex will be on the line y = x meaning this opposite vertex's location is (x,x). The x refers to the side length of the square. Replace x with any number. Going back to the previous example, if x = 7 then the square has two opposite vertices at (0,0) and (x,x) = (7,7), so this square has side length of 7. We will use the equation y = x later on (see figure 2 in the attached im