The answer in red isnot correct. The logarithm function does not work that way.

[Math]\log \left( {x^2 + 7x + 12} \right) = \log \left( {x + 3} \right) + \log \left( {x + 4} \right)~\&~\log \left( {x^2 - 9} \right) = \log \left( {x + 3} \right) + \log \left( {x - 3} \right)[/tex].

So the way you have written it does not allow the factors to divide out.

But the restriction above in blue is the domain of the problem as you have written it.