Check the final answer first, then review the worked steps.
8g^2 + 32g + 24 = 8(g^2 + 4g + 3) = 8(g+1)(g+3)