Let $\mathcal{X}^m, \mathcal{Y}^n,\mathcal{Z}^p$ be manifolds. Let $f : \mathcal{X} \to \mathcal{Z}$ and $g : \mathcal{Y} \to \mathcal{Z}$ be maps such that $f \pitchfork g$. Prove that $$\mathcal{M}=\{(x, y) \in X \times Y : f(x) = g(y)\}$$ is a smooth submanifold of $\mathcal{X} \times \mathcal{Y}$.
It seems what I have attempted is completely wrong...
Here's a start. $M = (f\times g)^{-1}(\Delta)$, where $\Delta$ is the diagonal in $Z\times Z$. You will need a linear algebra lemma: If $U$ and $W$ are subspaces of a vector space $V$, then $U+W=V\implies U\times W + \Delta = V\times V$, where here $\Delta$ is the diagonal of $V\times V$.