A rectangle is inscribed in a right isosceles triangle, such that two of its vertices lie on the hypotenuse, and two other on the legs. What are the lengths of the sides of the rectangle, if their ratio is 5:2, and the length of the hypotenuse is 45 in?