Poisson process, number of people in store by time $t$ Let $\{X(t); t\geq 0\}$ be a Poisson process of rate $\lambda$ that represents the arrival process of customers entering a store. I call $W_1,W_2,\dotsc$ the arrival time of the $k$th customer, and $Y_1,Y_2,\dotsc$  the amount of time that the customer spends in the store.  Each $Y_k$ are independent random variables having a common distribution function
$$G(y) = P(Y_k \leq y).$$  Finally, let $M(t)$ denote the number of people still in the store at time $t$, and $N(t)$ denote the number of people that arrived and departed by time $t$. The problem is to determine the joint distribution of $M(t)$ and $N(t)$.
So what I have is,
\begin{align*}
P(M(t) = j, N(t) = k|X(t) = n)&=
P\left[\sum_{i=1}^n\boldsymbol 1\left\{W_i+Y_i \geq t\right\}=j,\right.\\
&\qquad+ \left.\sum_{i=1}^n\boldsymbol 1\{
W_i+Y_i<t = k|X(t) = n\right]\\
&=P\left[\sum_{i=1}^n \boldsymbol 1\{U_i+Y_i \geq t\} = j,
\sum_{i=1}^n\boldsymbol 1\{U_i+Y_i<t\} = k\right]
\end{align*}
where the $U_i$ are independent $unif(0,t)$ because of symmetry and a theorem. But now I don't know where to take this from here. I'm not even sure that I am on the right track. I was hoping for some help and feedback. Thanks!
 A: I think you have the right idea. Since $X(t)=M(t)+N(t)$, conditioning on $X$ gives us
$$P(M(t)=m,\; N(t)=n) = P(X(t)=m+n)P(M(t)=m,\; N(t)=n\mid X(t)=m+n).$$
Firstly, $P(X(t)=m+n) = \dfrac{(\lambda t)^{m+n}}{(m+n)!}e^{-\lambda t}$.
Next, given $X(t)=m+n$, the arrival time of each of those $m+n$ customers is uniformly distributed on $(0,t)$. Further, to get $M(t)=m$ and $N(t)=n$, we need any $n$ of those $m+n$ customers to have left the store by time $t$. So, given $X(t)=m+n$, we have $N(t)\sim Bin(m+n,p)$ where
\begin{align}
p &= P(\text{Customer, having arrived by time $t$, leaves by time $t$}) \\
&= \int_{u=0}^{t} P(\text{Cust arrives at time $u$})P(\text{Customer spends less than $t-u$ time in the store}) \\
&= \int_{u=0}^{t} \dfrac{1}{t}G(t-u)\;du \\
&= \dfrac{1}{t} \int_{u=0}^{t} G(u)\;du.
\end{align}
\begin{align}
\therefore\quad P(M(t)=m,\; N(t)=n\mid X(t)=m+n) &= \binom{m+n}{n}p^n(1-p)^m \\
& \\
\therefore\quad P(M(t)=m,\; N(t)=n) &= \dfrac{(m+n)!}{m!n!}p^n(1-p)^m \dfrac{(\lambda t)^{m+n}}{(m+n)!}e^{-\lambda t} \\
&= \dfrac{(p\lambda t)^n ((1-p)\lambda t)^m}{n!m!} e^{-\lambda t}.
\end{align}
