Let x = the unknown number. When 12 is added to half the sum of a number and 8, the result is 40:
(1/2)(x+8) + 12 = 40
Subtract 12 from both sides:
(1/2)(x+8) = 28
Multiply both sides by 2:
x+8 = 56
Subtract 8 from both sides:
x = 48
Check:
(1/2)(x + 8) + 12 = 40
(1/2)(48 + 8) + 12 = 40
(1/2)(56) + 12 = 40
28 + 12 = 40
40 = 40
Check!!!