(In this answer all variables are integers, i.e., elements of $\mathbb{Z}$.)
By the definition of divisibility we are given that $\;n * a = b\;$ and $\;m * b = c\;$ for some $\;n\;$ and $\;m\;$. Now we are asked to find a $\;k\;$ which makes $\;k*a = c\;$:
\begin{align} & k*a = c \\ \equiv & \;\;\;\;\;\text{"use the only fact we know about $\;c\;$"} \\ & k*a = m*b \\ \equiv & \;\;\;\;\;\text{"use the other fact"} \\ & k*a = m*n*a \\ \Leftarrow & \;\;\;\;\;\text{"weaken using Leibniz' rule -- to achieve our goal"} \\ & k = m*n \\ \end{align}
Therefore we have found such a $\;k\;$, and hence proved $\;a|c\;$.