Let Q(x)= f(f(x)−g(x)). Find Q'(x).

the chain rule can get things started:

Q = f(f-g) = f(u)
dQ/dx = df/du (df/dx - dg/dx)

without some more info on f and g, it's a bit hard to elaborate on df/d(f-g)