Four identical right triangles, whose sides measure 5x, 12x, and 13x, are arranged to form a small square inside a large square, as shown. The perimeter of the large square is 17 units. What is the perimeter of the small square?
Diagram?