Right Triangles in a Square
Draw two lines out from a corner of a square to the opposite sides.
Connect the ends of these two lines with a third line, perpendicular
to one of the two lines, to form a right triangle. (You may have
to adjust the location of the first lines slightly.) Surrounding this
central right triangle are three more right triangles.

Find such a figure, such that the side lengths of all
four triangles are all integers.

I expect the previous answer, if it exists, will use some large integers.
For a smaller problem, find such a figure, such that just the side lengths of
the square and the internal triangle are integers.

What is the side length of the smallest square which can contain a 345
right triangle? A 51213? Is it possible to generalize this?

Label the square ABCD, with a side length of s.
One acute angle of the central right triangle is at point A.
What is the maximum distance the other acute angle can be away from
point C?
Source: Original.
Solution
Mail to Ken