It's f^prime(g(h(x))) g^prime (h(x)) h^prime(x)
Start by defining the function a(x)=g(h(x))
The the chain rule gives us:
(f @ g @ h)^prime (x)=(f @ alpha)^prime (x)=f^prime(alpha(x)) alpha^prime(x)
Applying the definition of alpha(x) to the equation above gives us:
f^prime(alpha(x)) alpha^prime(x) = f^prime (g(h(x))) (g @h)^prime (x)
Using the chain rule again:
f^prime (g(h(x))) (g @h)^prime (x) = f^prime(g(h(x))) g^prime(h(x)) h^prime(x)
Therefore:
(f @ g @ h)^prime (x) = f^prime(g(h(x))) g^prime(h(x)) h^prime(x)
The same derivation using the Leibniz notation and the definitions y=h(x), w=g(y):
d/(dx)[f(w)]=(df)/(dw) (dw)/dx=(df)/(dw) (dw)/(dy) (dy)/(dx) = (df)/(dw) (w) (dw)/(dy) (y) (dy)/(dx) (x) = (df)/(dw) (g(y)) (dw)/(dy) (h(x)) (dy)/(dx) (x) = (df)/(dw) (g(h(x))) (dw)/(dy) (h(x)) (dy)/(dx) (x) = f^prime(g(h(x))) g^prime (h(x)) h^prime(x)