Let the x-intercept be denoted by (a, 0)
Let the y-intercept be denoted by (0, b)
Then a^2 + b^2 = 21^2
Now draw the rectangle with vertices (0, 0), (6, 0), (0, 6), and (6, 6)
Draw a line segment from the y-axis to the x-axis through (6, 6)
There should be a triangle above the rectangle, and one to the right. These two will be similar, and using proportions (along with the pythagorean theorem, above) should give the solution.