The given functions are
f(x) = x^2 - 6x
g(x) = x + 7
a) To find (fog)(4), the first step is to find (fog)(x). To do this, we would substitute x = x + 7 into f(x) = x^2 - 6x. We have
f(x + 7) = (x + 7)^2 - 6(x + 7)
f(x + 7) = (x + 7)(x + 7) - 6(x + 7)
To expand the patentheses, we would apply the distributive property of multiplication. we would multiply the terms inside the perntheses by the terms in the other parentheses or the term outside. It becomes
(fog)(x) = x^2 + 7x + 7x + 49 - 6x - 42
By collecting like terms, we have
(fog)(x) = x^2 + 7x + 7x - 6x + 49 - 42
(fog)(x) = x^2 + 8x + 7
To find (fog)(4), we would substitute x = 4 into (fog)(x). Thus,
(fog)(4) = 4^2 + 8 * 4 + 7 = 16 + 32 + 7
(fog)(4) = 55
b) To find (gof)(4), the first step is to find (gof)(x). To do this, we would substitute x = x^2 - 6x into g(x) = x + 7. We have
(gof)(x) = x^2 - 6x + 7
We would find (gof)(4) by substituting x = 4 into (gof)(x) = x^2 - 6x + 7. It becomes
(gof)(4) = 4^2 - 6 * 4 + 7 = 16 - 24 + 7
(gof)(4) = - 1