The point is that you have the more general formula $f(g(t)+\epsilon h(t)) = f(g(t))+f'(g(t))h(t)\epsilon$. From that the chain rule follows: $$(f\circ g)(t+\epsilon) = f(g(t+\epsilon)) = f(g(t)+g'(t)\epsilon) = f(g(t))+f'(g(t))g'(t)$$$$(f\circ g)(t+\epsilon) = f(g(t+\epsilon)) = f(g(t)+g'(t)\epsilon) = f(g(t))+f'(g(t))g'(t)\epsilon$$ The more general formula follows from the simpler "by substitution", i.e., by applying appropriate ring homomorphisms.