I assume we have to begin with the triangle. Applying the Pyth. Thm.,
(x)^2 + (7y)^2 = (3x)^2, so that (7y)^2 = (3x)^2 - (x)^2, or 8x^2.
If (7y)^2 = 8x^2, then 7y = sqrt(8x^2) = 2sqrt(2)x. This is the width of the rectangle, i. e., width 7y = 2sqrt(2)*x.