The standard approach to defining smooth functions $f:M\to\mathbb{R}$ on a topological manifold $M$ equipped with a smooth structure (i.e., a maximal smooth atlas) $\mathcal{A}$ is the following. Say a function $f$ is smooth at $p\in M$ if there exists a coordinate chart $(U,\phi)\in\mathcal{A}$ such that $p\in U$ and $$f\circ\phi^{-1}:\phi(U)\to\mathbb{R}$$ is smooth. (Say $M$ is $n$-dimensional, so that $U$ is homeomorphic to $\phi(U)\subset\mathbb{R}^n$.)
It is then supposed to be a simple exercise that the smoothness of $f$ at $p$ doesn't depend on the choice of chart $(U,\phi)$, in the sense that $f$ will be smooth in all charts $(V,\theta)\in\mathcal{A}$ such that $p\in V$. (Lang, for example, says "One sees then immediately..." See the photo at the end of this post.) I take this to mean that if $f\circ\phi^{-1}$ is smooth for some $(U,\phi)$, then for any $V$ such that $p\in V$, we have $$\boxed{f\circ\theta^{-1}:\theta(V)\to\mathbb{R}}$$ is smooth.
Here is where I'm confused. I know how the proof is supposed to go: you use the fact that chart transformations must be smooth (by the definition of the smooth atlas), writing $$f\circ\theta^{-1}=(\underbrace{f\circ\phi^{-1}}_{:=\alpha})\circ(\underbrace{\phi\circ\theta^{-1}}_{:=\beta})$$ By assumption, $\alpha$ is smooth, and $\beta$ is smooth because it is a chart transformation. Indeed the point of requiring smooth chart transitions is precisely to make this argument go through.
But the problem I'm having is with domains. The function $f\circ\theta^{-1}$ is defined on all of $\theta(V)\subset\mathbb{R}^n$, whereas the chart transformation $\beta$ is defined only on the smaller domain $\theta(U\cap V)\subset\theta(V)$. So I don't see how $f\circ\theta^{-1}$ can be defined on all of $\theta(V)$, and that seems to be what I need to check (per the box above). So my question is: how exactly is this argument supposed to go? Do I need define $f\circ\theta^{-1}$ piecewise as $\alpha\circ\beta$ on $\theta(U\cap V)$ together with some other definition on $\theta(V)-\theta(U\cap V)$?
I think I'm missing something very simple, but I can't see it. This issue has bothered me for years.
Lang's definition:

