From section 1, problem 3 of Differential Topology by Guillemin and Pollack:
Let $X \subset R^N, Y \subset R^M, Z \subset R^L$ be arbitrary subsets, and let $f : X \to Y, g : Y \to Z$ be smooth maps. Then [show that] the composite $g \circ f : X \to Z$ is smooth.
I don't really know where to go with this. The definition of smooth I'm working with is:
A mapping $f$ of an open set $U \subset R^n$ into $R^m$ is called smooth if it has continuous partial derivatives of all orders. (1)
A map $f : X \to R^m$ defined on an arbitrary subset X in $R^m$ is called smooth if it may be locally extended to a smooth map on open sets; that is, if around each point $x \in X$ there is an open set $U \subset R^n$ and a smooth map $F : U \to R^m$ such that $F$ equals $f$ on $U \cap X$. (2)
Using definition (2), take $F,G$ to be smooth local extensions of $f,g$ around arbitrary points $x \in X, y \in Y$ defined on open sets $U \subset R^N, V \subset R^M$ (respectively). Let $h = g \circ f$. I need to show that for arbitrary $x \in X$, there is a smooth (definition (1)) local extension $H$ of $h$ on an open set around $x$.
Take $H = G \circ F : U \to Z$. Given that $F,G$ are smooth (definition (1)), I now need to show that $H$ is smooth by definition (1), i.e., that it has "continuous partial derivatives of all orders". I'm not quite sure how to go about that.
$H$ is smooth because the composition of differentiable functions is differentiable, and if the differential are continuous also the differential of the composition is continuous.
The point here is another. Are you sure that $F$ maps $U$ into $V$? This is not guaranteed. Indeed you should maybe restrict $U$ to get this condition satisfied.