First calculate g(-2) by substituting x= -2 into the formula g(x) = 1-x. You will get g(-2) = 1 - (-2) = 1 + 2 = 3. Next calculate f(3) by substituting x= 3 into the formula f(x) = x^2 + 1. You will get f(3) = 3^2 + 1 = 9 + 1 = 10. Thus (fog)(-2) = 10.
(fog)(x) = f(g(x)) = f(1-x) = (1-x)^2 + 1 <<<---=== it is the general formula for f(g(x)) Now substitute x= -2 and calculate. You will get the same answer 10.