(i) Let x and y be the cathete lengths.
If you maximise you also maximise
(ii) Same principle
Let x be the little side and y be the long side
You differentiate and set equal to 0.
Use the second derivative test to see the nature of the extrema .