Answer:
x = 4
Explanation:
Right Triangles
In right triangles, where one of the internal angles is 90°, the Pythagora's Theorem is satisfied:
If m is the hypotenuse of a right triangle, and p, q are the shorter sides or legs, then:

If we need to calculate any of the legs, say, p:

The figure below shows two additional variables z and h which will help us to find the value of x.
The triangle with sides 12, 36, z can be solved for z, being 36 the hypotenuse:

The base of the triangle to the left is (36-x), the height is h, and the hypotenuse is z, thus:

Substituting z:

The triangle to the right has dimensions x, h, and 12, and:

Equating both expressions for h:

Expanding the squares:

Simplifying the x squared and operating:
-144+72x=144
Adding 144:
72x = 288
Solving:
x = 288 / 72 =4
x = 4