A vertex is either an internal vertex or a leaf. Since the number of all vertices is $n$ while the number of internal nodes is $i$, the number of leaves, $l$ is $n-i$.
Every vertex is identified as a child of an internal node except the root. Since there are $i$ internal node, each of them having $m$ children, the number of vertices is $m\cdot i + 1$.