To solve for a you must isolate it, meaning that a must be the only thing on the left side of the equation.
To do this first add 16 to both sides (what you do on one side you must do to the other). Since 16 is being subtracted, addition (the opposite of subtraction) will cancel it out (make it zero) from the left side and bring it over to the right side.
8a + (- 16 + 16) = 40 + 16
8a + 0 = 56
8a = 56
Next divide 8 to both sides to finish isolating a. Since 8 is being multiplied by a, division (the opposite of multiplication) will cancel 8 out (in this case it will make 8 one) from the left side and bring it over to the right side.
8a/8 = 56/8
1a = 7
a = 7
Check:
8(7) - 16 = 40
56 - 16 = 40
40 = 40
Hope this helped!
~Just a girl in love with Shawn Mendes