The question reads:
Let $f:A\to B$ and let $\sim$ be the equivalence relation on $A$ be given by $a,a^\prime\in A$ satisfy $a\sim a^\prime \iff f(a)=f(a^\prime)$. Show that the map $\bar{f}:A/{\sim}\to \text{Im}(f)$ given by sending $[a]$ to $f(a)$ is bijective. Deduce that every map can be written as the composition of a surjective map, an injective map and a bijective map.
My working for the first part is as follows (which I think is correct):
If $\bar{f}([a])=\bar{f}([a^\prime])$ by the definition of $\bar{f}$, $f(a)=f(a^\prime)$ and thus $a\sim a^\prime$. Therefore the equivalence class of $a$ and $a^\prime$ are the same i.e. $[a]=[a^\prime]$ which is the desired result to show $\bar{f}$ is injective.
For surjectivity, let $a\in A$ such that $f(a)=b$. Then as above, $\bar{f}([a])=f(a)=b$ so there exists an $[a]\in A/{\sim}$ such that $\bar{f}([a])=b$.
Since $\bar{f}$ is both injective and surjective, it is bijective.
For the last part of the question (deducing it can be written as the composition of a surjective, bijective and an injective map) I am struggling to see how this follows from the above. I know I have shown $\bar{f}$ is bijective, so do I need to find an injective and bijective map to compose elements from the set $A$ to $A/{\sim}$, and $A/{\sim}$ to $B$?