I'm aware that there is a thread about this proof. However, I have a slightly different approach which I can not verify myself - hence, this thread.
Proof.
If $\,g(f(a_j))=g(f(a_k))$ and $g$ is injective, then $f(a_j)=f(a_k)$.
If $\,f(a_j)=f(a_k)$ and $f$ is injective, then $a_j=a_k$.
Therefore, if $\,g(f(a_j))=g(f(a_k))$ and $g$ and $f$ are injective, then $a_j=a_k$ and thus $g(f(a))$ is an injective function if $g$ and $f$ are injective.
Is it correct?
In a logical context, I have some troubles getting this proof intuitively. All I can see is usage of implications and thus I don't fully understand the full picture...
A way to see this intuitively is by "drawing arrows". An injective function is basically a set of arrows, no two of which go to the same point (see the picture below). Now suppose instead of just an injection $X\to Y$ we also had another injection $Y\to Z$, and we wanted to compose them. Then the resulting "set of arrows" from $X\to Z$ will also have no two arrows ending up at the same place, because two arrows starting out at different places end up at different places in $Y$, then therefore end up at different places in $Z$. Try drawing arrows to convince yourself of this!
(source of image: wikipedia)