a must equal -3.
Just looking at the first term of the left hand side of the equation, it must equal 24x². The only time x terms are being multiplied to form an x² on the right hand side of the equation is in the first two parenthesis. Therefore, -8 times a must be equal to 24, and from this you can get a= -3.