Check the final answer first, then review the worked steps.
5g(g + 7) = 5g \cdot g + 5g \cdot 7 = 5g^{2} + 35g