.
Notice that the line through these point is the line x + y = 4.
Regarding the legs u and v, we have therefore u + v = 4.
Now we can reformulate our problem.
We see that x + y = 4, or u + v = 4.
It means that 2(u+v) = 8.
So the question is: among all rectangles with the given perimeter of 8 units,
which one has the maximum area ?
It is one of classic minimax problems, and the answer is WELL KNOWN:
a square with the side length of 1/4 of the perimeter
gives a maximum area.
So, u = v = 2 gives the maximum area of the shaded triangle.
Solved.
----------------
Do you understand everything in my solution/explanation ?