1) Factor out the coefficient 2: 2x^2+12x=4 => 2(x^2 + 6x) = 4
2) Complete the square of x^2 + 6x: x^2 + 6x + 9 - 9. Then:
2(x^2 + 6x + 9 - 9) = 4
3) Rewrite the square as the square of a binomial:
2( [x+3]^2 - 9) = 4, or
2([x+3]^2) = 22, or
2( [x+3]^2 ) - 22 = 0
The value of q is -22.