Manifolds - Characterization of Graph

I'm trying to prove the following:

Suppose $M$ and $N$ are smooth manifolds and $S \subset M \times N$ is an immersed submanifold. Let $\pi$ denote the projection $M \times N \to M$. TFAE:

(i) $S$ is the graph of a smooth map $f: M \to N$.

(ii) $\pi \vert_S$ is a diffeomorphism onto $M$.

(iii) For each $p \in M$, the submanifolds $S$ and $\pi^{-1}(\{p\})$ intersect transversally in exactly one point.

This is an exercise from Lee's Smooth Manifolds, which I'm attempting as part of exam prep.

It's easy to see that (i) and (ii) are equivalent. I'm having trouble getting the equivalence with (iii) though.

If (i) and (ii) hold, then it's clear that the submanifolds $S$ and $\pi^{-1}(\{p\})$ intersect in exactly one point $f(p)$. Furthermore, $T_{f(p)}\pi^{-1}(\{p\}) = \ker d_{f(p)} \pi$. However, I don't know how to get from this to $$T_{f(p)}\pi^{-1}(\{p\}) + T_{f(p)}S = T_{f(p)}(M \times N).$$

For (iii) $\Rightarrow$ (i)/(ii), we can see that (iii) implies that $\pi\vert_S$ is a (continuous) bijection onto $M$. I think I need to use the fact that if the differential of $\pi\vert_S$ is invertible, then $\pi\vert_S$ is a local diffeomorphism, but I'm not sure how...

Any guidance would be appreciated. Thanks.