Try to solve for x algebraically. Isolate x by adding, subtracting, multiplying or dividing until x is by itself on the left side (make sure to do the same thing to both sides!).
2x-12 = 40 (add 12 to both sides)
2x = 52 (now divide both sides by 2)
x = 52/2 = 26
x = 26
To make sure this is right, go ahead and plug x = 26 back into the original equation:
2(26) - 12 = 40
52 - 12 = 40
See now that this works!