In the formula a^2 + b^2 = c^2, a is (most often) the height of the triangle, b is the length of the triangle, and c is the last side-length connecting a and b, called the hypotenuse. The formula states that a and b must form a 90 degree angle, and that a^2 + b^2 = c^2.
So, to find x in this triangle:
x^2 + 8^2 = 12^2
x^2 + 64 = 144
x^2 = 80
x = 8.94
Hope this helps!