Just jump the gun and multiply -7 and the value of d
-2[7x^2-24]-31
I got
-14x^2+17
as the total answer btw...