Question: Given a Poisson process $N(t),t≥0$ with rate $λ$, calculate the covariance of $N(2)$ and $N(3)$.
Attempt: So clearly $N(2) \sim Po(2\lambda)$ and $N(3) \sim Po(3\lambda)$. So, $\mathbb{E}(N(2))=2\lambda$ and $\mathbb{E}(N(3))=3\lambda$.
We know $Cov(N(2),N(3))=\mathbb{E}(N(2)N(3))-\mathbb{E}(N(2))\mathbb{E}(N(3))$
Now, I saw somewhere that $\mathbb{E}(N(2)N(3))=\mathbb{E}(N(2)\mathbb{E}(N(3)|N(2))$ but I can't quite seem to get to it nor see whether it's actually useful?
To "get to" the formula you mention, use the law of total expectation: $$ \mathbb{E}[X \mid \mathcal{G}_1] = \mathbb{E}[\mathbb{E}[X \mid \mathcal{G}_2] \mid \mathcal{G}_1] $$ for any random variable $X$ and any $\sigma$-fields $\mathcal{G}_1 \subseteq \mathcal{G}_2$. Apply this to $X=N(2)N(3)$ and $\mathcal{G}_1 = \sigma(N(2))$, $\mathcal{G}_2 = \mathcal{F}$ (the original $\sigma$-field for the space).
Next, to use this, note that \begin{align} \mathbb{E}[N(3) \mid N(2)] &= \mathbb{E}[N(0,2] + N(2,3] \mid N(0,2]] \\ &= N(0,2] + \mathbb{E}[N(2,3] \mid N(0,2]] \\ &= N(0,2] + \mathbb{E}[N(2,3] ] \\ \end{align} because of independent increments. Therefore \begin{align} \mathbb{E}[N(2)N(3)] &= \mathbb{E}[N(2)^2 + N(2)N(2,3]] \\ &= \mathbb{E}[N(2)^2] + \mathbb{E}[N(2)]\mathbb{E}[N(2,3]] \\ &= 2\lambda + (2\lambda)^2 + 2\lambda^2 \\ &= 2\lambda(3\lambda + 1). \end{align}