Uniqueness of passing to the quotient space mapping From Intro to Topological Manifolds by Lee:



Since we are constructing this map, we know it exists.
However, I having trouble elaborating showing the map is well-defined and unique.
How can this argument be spelled out more?
 A: Take $y \in Y$ then we want to define $\tilde{f}$ such that $\tilde{f} \circ q = f$, so the only way we can define $\tilde{f}(y)$ is to take some $x$ with $q(x) = y$ ($q$ must be surjective, so such $x$ exist) and define $\tilde{f}(y) = f(x)$. For this $x$ we then automatically have $$(\tilde{f} \circ q)(x) = \tilde{f}(q(x)) = \tilde{f}(y) = f(x)$$ This map $\tilde{f}$ is well-defined because whatever $x$ or $x'$ we choose with $q(x) = y$ or $q(x') = y$, we always have $x \in q^{-1}[\{y\}]$ and $x' \in q^{-1}[\{y\}]$, so $x, x'$ are both in the $q$-fibre of $y$.
And the condition of constance on $q$-fibres means that $f$ assumed only one value on this fibre $q^{-1}[\{y\}]$ or, as stated in the theorem:
$$\forall x,x' \in X: q(x) = q(x') \to f(x) = f(x')$$
which states exactly the condition that we can choose any point of $x \in X$ to define $\tilde{f}(y)$ as long as $q(x) = y$. This covers well-definedness. 
The unicity was already clear above: the condition that $\tilde{f} \circ q = f$ leaves us no choice: suppose $f': Y \to Z$ were another function satisfying that condition, then $f'(y) = f'(q(x))$ for some $x \in X$ by surjectivity, and so this should equal $f(x)$ by the commutativity condition, just like $\tilde{f}(y)$ for that $x$. So the map is clearly unique.
