I have a right $\triangle ABC$ and I want to find the side length of one of the legs, $x$, when the square is at its max area, as shown in
I am given that $AB + BC$ is $10$.
Here's what I tried so far:
I found ratios between the sides using similarity, but I wasn't able to get a conclusive answer, just things in terms of each other.
I tried to set up equations using the Pythagorean theorem, but that just ended up with some messy variable terms and zero actual progress.
The answer is $x=5$, but I want to know how I would go about approaching this kind of problem. It's like others I've seen before here and in other places, but not being given the side lengths threw me off.