Suppose $E\subseteq\mathbb R^n$ and $f$ maps $E$ into $\mathbb R^m$. Let $g$ map a subset of $\mathbb R^m$ into $\mathbb R^p$. If $f$ is differentiable at $x\in E$ and $g$ is differentiable at $f(x) \in f(E)$, then the composition $g \circ f$ is differentiable at $x$ and $$(g\circ f)'(x) = g'(f(x)) f'(x).$$
Proof. By definition of differentiability, $x$ is an interior point of $E$ and $f(x)$ is an interior point of the domain of $g$. Therefore, continuity of $f$ at $x$ ensures that $x$ is an interior point of the domain of $g \circ f$.
This is the first part of proving that $x$ is an interior point of the domain of the composition function.
my question is why they use the continuity of $f$ at $x$? Where it is trivial that $x$ is in the domain of $f$ which is $E$ and by the hypothesis $x$ is an interior point of $E$ and the domain of $g \circ f$ is also $E$.
This proof is from SHIRALI-BASUDEVA MULTIVARIABLE ANALYSIS BOOK.
Sorry I am not so much accustomed with writing in LaTeX. Please make some edit for me.