Let $f: M \to N$ be differentiable. Show that the graph $G:=\{(q, f(q))\mid q \in M\}$ is a submanifold of $M\times N$. Here $M \times N$ carries the product topology.
Definition 9.1. A subset $S$ of a manifold $N$ of dimension $n$ is a regular submanifold of dimension $k$ if for every $p \in S$ there is a coordinate neighborhood $(U,f) = (U,x_1,\dots,x_n)$ of $p$ in the maximal atlas of $N$ such that $U \cap S$ is defined by the vanishing of $n−k$ of the coordinate functions. By renumbering the coordinates, we may assume that these $n−k$ coordinate functions are $x_{k+1},\dots,x_n$. We call such a chart $(U,f)$ in $N$ an adapted chart relative to $S$. On $U \cap S$, $f = (x_1, . . . ,x_k,0, . . . ,0)$. Let $f_S : U\cap S→\mathbb{R}^k$ be the restriction of the first $k$ components of $f$ to $U \cap S$, that is, $f_S = (x_1, . . . ,x_k)$. Note that $(U\cap S,f_S)$ is a chart for $S$ in the subspace topology.
Attempt: Let $(q,f(q)) \in G$. Put $r= f(q)$. Because $f$ is a differentiable manifold between smooth manifolds, we can find charts $(U_q, \phi_q)$ around $q$ and $(V_{r},\psi_{r})$ around $r$ such that
$$\phi\circ f\circ\phi_q^{-1}: \phi_q(U_q \cap f^{-1}(V_{r})) \to \mathbb{R}^m$$ is $C^\infty$ (in the calculus sense).
I then looked at the chart $\phi_q \times \psi_{r}: U_q \times V_{r} \to \phi_q(U_q) \times \psi_{r}(V_{r})$ around $(q, r)$.
We have
$$(\phi_q\times \psi_{r})(G \cap (U_q \times V_{r})) = (\phi_q\times \psi_{r})(U_q \times (f(U_{q}) \cap V_{r}))$$ $$= \phi_q(U_q) \times \psi_{r}(f(U_q) \cap V_{r})$$
I would like the last factor to become identically $0$, so that I have a submanifold, but I can't proceed from here.
Any ideas?
It's sufficient to prove this in the special case of a smooth function $g\colon U\to\mathbf{R}^n$ where $U\subset\mathbf{R}^m$ is open (I'll outline how you use this special case to prove the general one). You don't need any special machinery, but the argument is made more tedious with details to check. I'll leave some of these details to you to fill in.
The idea is that in a well-chosen basic nbhd $U\times V$ of $(p,g(p))$, we can craft a smoothly compatible chart that realizes the subset $\{(p,g(p)) : p\in U\}$ as a subset of the plane $\mathbf{R}^m\times 0\subset \mathbf{R}^m\times \mathbf{R}^n$ by projection.
Let's choose $U$ open about $p$ and $V$ open about $g(p)$ so small that $g(U)\subset V$. This guarantees that the graph of $g$ restricted to $U$ is completely contained in $U\times V$. This will only end up mattering when we try to generalize this argument to coordinates on arbitrary manifolds $M$ and $N$.
Now we try to define a smooth chart $z\colon U\times V\to \mathbf{R}^m\times \mathbf{R}^n$ extending the projection $(p,g(p))\mapsto (p,0)$. To start, define $z_0=\left. z\right|\{(p,g(p))\}$ by $z_0(p,g(p))=p$. The obvious extension to try now would be $z(p,q)=(p,q-g(p))$, using the second coordinate of $(p,g(p))$ as a sort of yardstick for each $p\in U$. This certainly extends $z_0$ and looks smooth, so let's analyze our candidate chart $z\colon U\times V\to \mathbf{R}^m\times\mathbf{R}^n$ defined by $(p,q)\mapsto (p,q-g(p))$ a little closer.
$z$ as defined is definitely smooth and, moreover, $z(p,g(p))=(p,0)$ (slightly abusing notation). $z$ is also injective as a quick check shows. The invariance of domain (or a point-set argument that I leave to you to supply) implies that $Im(z)$ is open. You can also show that $z$ has a smooth inverse $Im(z)\to U\times V$ which, likewise, I leave to you. This shows that $z$ is definitely a smoothly compatible chart for the standard smooth structure on Euclidean space.
Since $g$ always sits nicely in the standard $m$-dimensional subspace of $\mathbf{R}^{m\times n}$ in this chart, we see that the graph of $g$ is an $m$-dimensional submanifold of $\mathbf{R}^{m\times n}$.
Now suppose $f\colon M\to N$ is smooth. Pick charts $(x,U)$ about $p\in M$ and $(y,V)$ about $f(p)$ in $N$. Then $(x\times y,U\times V)$ is a smoothly compatible chart about $(p,f(p))$ in $M\times N$. Perhaps by shrinking $U$ a little bit, we may suppose by maximality of the smooth atlases that $f(U)\subset V$. Let $g=y\circ f\circ x^{-1}$. Then $g\colon x(U)\to \mathbf{R}^n$ where $x(U)\subset\mathbf{R}^m$ is open and in particular $g(U)\subset y(V)\mathop{\subset}\limits_{\text{open}}\mathbf{R}^n$.
The point of shrinking $U$ like this is that we make sure we don't have to worry that our yardstick is undefined for some $(p,q)\in x(U)\times y(V)$. That is, we have guaranteed that for each $p\in x(U)$, $g(p)$ exists so it makes sense to send $(p,q)\mapsto (p,q-g(p))$ and we can therefore run the above argument.
Running the argument above the line with $x(U)$ and $y(V)$ replacing $U$ and $V$ respectively, you can produce a chart $z\colon x(U)\times y(V)\to \mathbf{R}^m\times\mathbf{R}^n$ sending $(p,g(p))\mapsto (p,0)$ for each $p\in x(U)$ defined as before.