18 - 12 = 6. Because the top legs of the 2 triangles are congruent, you divide 6 / 2 to get 3 as their length. Then you can use the Pythagorean Theorem to solve for x.
3^2 + x^2 = 14^2
9 + x^2 = 196
x^2 = 187
x = sqrt(187)