I don't know, but whenever I hear "right triangle", the Pythagorean Theorem always comes to my mind.

We will use here the Pythagorean Theorem.

let the short leg of the inscribed triangle be u, and the long leg be v.

In the triangle containing x, and whose hypotenuse is u,

u^2 = 12^2 +x^2

In the triangle whose hypotenuse is v,

v^2 = 12^2 +(26 -x)^2

In the inscribed triangle in question,

26^2 = u^2 +v^2

So,

26^2 = [12^2 +x^2] +[12^2 +(26 -x)^2]

26^2 = 12^2 +x^2 +12^2 +26^2 -52x +x^2

0 = 2(12^2) -52x +2x^2

0 = 12^2 -26x +x^2

0 = 144 -26x +x^2

By Quadratic formula,

x = {26 +,-sqrt[(26)^2 -4(1)(144)]} / 2(1)

x = 8 or 18 ------------------answer.