This a tricky one! Here's a full explanation from Mike, our math expert:
First of all, I will say, for the GRE Quant section, the two formulas
1) (x + y)^2 = (x^2) + 2xy + (y^2)
2) (x - y)^2 = (x^2) - 2xy + (y^2)
are two you just have to have at your fingertips, because they are magically valuable.
How did it occur to Brent (the solution guy) to use this pattern? Well, think about what the question seeks: the perimeter. The perimeter would be (leg #1) + (leg #2) + (hypotenuse, or in terms of the numbers and variables we already have:
perimeter = 12 + x + y
Now, the very methodical reductionist left-brain way of solving this would be ---- first, find x, then separately, find y, and then once you have both of those, then plug in to find the perimeter. It turns out, even though that seems straightforward, it turns into a very ugly and complicated approach, very difficult, very time-consuming. In fact, this question, like questions on the real GRE, is designed to punish without mercy folks who take that very reductionist left-brain approach. The individual values of x and y are irrational numbers, horribly complicated radical expressions. This is that rare question where the methodical left-brain approach is a direct road to hell --- and there will be questions like this on the GRE.
Instead, solving the problem with grace, with elegance, involves the right-brain insight that --- in order to find 12 + x + y, you don't need to find x and y separately --- all you need to know is (x + y) --- if you know that, you can find the perimeter.
Next insight --- if you can find (x + y)^2, then it would be easy to find (x + y).
Of course, the insight that (x + y)^2 would be helpful only is powerful if you already have the magical formula (x + y)^2 = (x^2) + 2xy + (y^2) at your fingertips.
From the Pythagorean Theorem, we have (x^2) + (y^2) = 144.
(The very fact that we have these squares floating around from the Pythagorean Theorem is what feeds the insight that we might be able to use (x + y)^2 to find (x + y) to find the perimeter.)
Area = (1/2)xy = 28 ----> xy = 56
So, we want to build (x + y)^2 = (x^2) + 2xy + (y^2). We already have the (x^2) and (y^2) pieces from the Pythagorean Theorem, so we need that middle piece, the 2xy. We have xy = 56 from the area equation, so we need to multiply that by 2 to get 2xy.
xy = 56 ----> 2xy = 112
(x + y)^2 = (x^2) + 2xy + (y^2) = (x^2) + (y^2) + 2xy = 144 + 112 = 256
(x + y)^2 = 256 ---> x + y = 16
Perimeter = 12 + x + y = 12 + 16 = 28 ----> C