12x^2-24x+9=3(4x^2-8x+3)=3(2x-3)(2x-1).
3 is not a factor of 16x^2-ax-12 so the common factor is 2x-3 or 2x-1.
Start with 2x-3; (2x-3)(8x+p)=16x^2-24x+2xp-3p=16x^2-ax-12, where p is a number we have to find.
We can now equate the coefficients of x.
So for this to work, -3p=-12 and p=4, so -24+2p=-a and a=24-2p=24-8=16.
If we try 2x-1 we get (2x-1)(8x+q)=16x^2-8x+2xq-q=16x^2-ax-12, so q=12 and -a=-8+2q=-8+24, a=-16.
So we have two values for a giving us 16x^2-16x-12=4(4x^2-4x-3)=4(2x-3)(2x+1).
And 16x^2+16x-12=4(2x+3)(2x-1).
Therefore a=16 or -16.