Let $f(x)=x^2-7x+18$ and let $g(f(x))=2x+3$. What is the sum of all possible values of $g(8)$?
I notice that $g(8)$ depends on what values of $x$ make $f(x)=8$. So I want to find the solutions of the equation $f(x)=8$. That means I need to solve $x^2-7x+18=8$. I can rewrite this as $x^2-7x+10=0$. I can factor this as $(x-5)(x-2)=0$. So the solutions are $x=5$ and $x=2$. Now I can plug these values of $x$ into $g(f(x))$ and get $g(8)$. When $x=5$, I have $g(f(5))=g(8)=2(5)+3=13$. When $x=2$, I have $g(f(2))=g(8)=2(2)+3=7$. So the possible values of $g(8)$ are $13$ and $7$. The sum of these values is $13+7=20$. 