Got stuck, huh? Don't worry. Most people don't even know where to start, so if you even tried, then you did great.

In order to solve for the unknowns a and b, we need to first develop equations for them. Most people try to do this based on a
single triangle and decide that since for any right triangle \(a^2+b^2=c^2\), they can start with \((a+1)^2+(b+1)^2=16\) and try
to solve it that way. It looks easy enough, but it's not. It might be possible, but I've never seen it done.

The way to solve the problem is quite simple. We start by determining that the slope of line \(c\) is \(\frac{1}{a}\) or \(\frac{b}{1}\).
We then get:

\(\frac{b}{1}=\frac{1}{a}\)

So the equations are simply:

\(a=\frac{1}{b}\)
\(b=\frac{1}{a}\)

Now we can solve the big triangle. We use the fact that \(a^2+b^2=c^2\) in order to calculate the total hypotenuse based on
the two known triangles (since the sum of their hypotenuses gives us the length of line \(c\)):

\(c^2=(\sqrt{a^2+1}+\sqrt{b^2+1})^2\)

we want to solve for one variable, so we choose \(a\):

Now we do a little bit of subtitution. Let \(d=\frac{1}{a^2}+a^2+2\); then:

\(16=d+2\sqrt{d}\)

Ready for some magic? Given the form \(b=a+2\sqrt{a}\), we can solve for \(a\). Through a bit of math, we can determine that
\(a=(b+2)-\)\(2\sqrt{b+1}\). So we plug in our values: