Write each of the following functions as a composition of functions chosen from $f$, $g$, and $h$. Let $f(x)=|x|$, $g(x)=x-7$, and $h(x)=x^2$.

$A(x)=x^2-7$
$B(x)=x^2-14x+49$
$C(x)= |x-7|$
$D(x)=(x^2-7)^2$


For number one I tried using $(fog)(x)= f(g(x))$ but I got the answer as being the absolute value of $x-7$ which is wrong. Please help.
I understand how it works now. Thank you very much everyone!
$A(x)=(g\circ h)(x)$ as $g(x^{2})=x^{2}-7$.
$A = g\circ h$ since $g(h(x)) = h(x)-7 = x^2-7$
$B = h\circ g$ since $h(g(x)) = (x-7)^2 = x^2-2\cdot 7x + 49$
$C = f\circ g$ since $f(g(x)) = \lvert g(x)\rvert = \lvert x-7\rvert$
$D = h\circ g\circ h$ since $h(g(h(x))) = \left(g(x^2)\right)^2 = (x^2-7)^2$