# Queuing processing and Gamma distribution

I've been trying to solve the following exercise and I was hoping for your input.

If $$Q$$ is a queueing process with arrival rate $$\lambda$$ and service rate $$\mu$$, and a customer arrives to find exactly $$k$$ customers waiting ahead (including the person being served), show that this customer leaves the queueing system after a length of time which has the gamma distribution with parameters $$k+1$$ and $$\mu$$.

source: Probability: An Introduction - Grimmet & Welsh

If we call $$Z$$ the random variable that is equal to the time that $$k+1$$ customers have been dealt with, we know that $$Z = \sum_{i=1}^{k+1}X_i$$ with $$X_i$$ being the service time for customer $$i$$. We know that $$X_i$$ for all $$i$$ is distributed exponentially with parameter $$\mu$$. That is: $$\forall i\in \{ 1,2,\ldots ,k+1\}: X_i \sim Exp(\mu)$$. Thus I assume that we need to find that a sum of $$b$$ exponentially distributed random variables, all with parameter $$a$$ is Gamma distributed with parameters $$a$$ and $$b$$ respectively.

How could I show this in a neat manner? I'd assume using convolution integrals combined with induction, but I feel as if there should be an easier/smarter way of showing this fact.

First, note that $$\Gamma(1,\mu) = \mathcal E(\mu)$$, ie an exponential with rate $$\mu$$. Now our claim is that $$\Gamma(\ell,\mu) + \Gamma(k,\mu) = \Gamma(\ell+k,\mu)$$, in distribution, where the two random variables on the left-hand side are independent -- write these two as $$X_\ell$$ and $$X_k$$. Using the pdf for the $$\Gamma$$ distribution, one can calculate that $$E(e^{\theta X_k}) = (1 - \theta/\mu)^{-k} \quad\text{for}\quad \theta < \mu.$$ Hence we see that $$E(e^{\theta(X_k + X_\ell)}) = E(e^{\theta X_k}) E(e^{\theta X_\ell}) = (1 - \theta/\mu)^{-(k+\ell)},$$ which is the mgf of $$\Gamma(k+\ell,\mu)$$.
A simply application of induction now implies that $$\sum_{i=1}^n \mathcal E_i \sim \Gamma(n,\mu)$$ if $$\mathcal E_i \sim \mathcal E(\mu)$$.