Given a set $X$ and an equivalence relation $\sim$ on $X$, define quotient mapping $\pi:X \to X/\sim$, it's known the canonical projection is surjective and this fact follows from definition of equivalence class and the symmetric property of $\sim$.
Theorem:
Define $f:\small X \to B$ such that for every $a,b \in X$ if $a \sim b$ implies $f(a)=f(b)$, then there exist a unique function $G:\small {X/\sim} \to B$, such that $f = g\pi$. If f is a surjection and $a \sim b ↔ f(a) = f(b)$, then $g$ is a bijection.
If $f$ is surjective then so is $g$, form where the injectively of $g$ follows?and why $g$ is unique?
Also what is the application of this theorem?
$g$ is unique because it is determined by $[x]\mapsto f(x)$ where $[x]$ denotes the equivalence class represented by $x$.
If $h$ would do the same then $h([x])=f(x)=g([x])$ for every $x$ hence $h=g$.
$g$ is injective because $g([x])=g([y])$ implies that $f(x)=g([x])=g([y])=f(y)$ or equivalently $x\sim y$ or equivalently $[x]=[y]$.
Application of the theorem...
Well, it appears that by surjective $f:X\to B$ there is no essential difference between $X/\sim$ (with elements $[x]$) and $B$ (with elements $f(x)$) and no essential difference between $f$ and $\pi$. We can mark $f$ as a quotient function, just like the canonical $\pi$. It is a good thing to have a bright view on that.