Let f(x)=-2x+2 and g(x)=-1x+5. Find (f∘g)(7).
Note
For a composition, work from the inside to the outside. That means evaluate g(x) first, then use that result as the input of f. Here, Composition means f(g(x)). First g(7)=-1(7)+5=-2; then f(g(7))=-2(-2)+2=6. This is why the final value of (f∘g) is obtained only after the second substitution, not after finding g alone.
