Poisson-processes and it's arrival times I am currently studying for my non-life insurance exam and have the following problem:
Let $S(t) = \sum_{i=1}^{N(t)} (X_i + T_i)^2$, where $X_i$ are i.i.d. r.v. with density $f(x)$ and $T_i$ are the arrival times of the homogeneous possion process $N(t)$ with intensity $\lambda =2$. With a fiven density $f(x) = \exp(-x)$ for $x \geq 0$, how can one calculate $E[S(t)]$?
Now I know that $P(T_1 > t) = \exp(-\int_0^t \lambda(s) ds) = \exp(-2t)$. So the density would be given by $g_1(t) = 2\exp(-2t) $.
Furthermore I could write the following:
$$ S(t) = \sum_{i=1}^{N(t)} (X_i + T_i)^2 = \sum_{i=1}^{N(t)} X_i^2 + 2\sum_{i=1}^{N(t)} X_i T_i + \sum_{i=1}^{N(t)}T_i^2 $$
If I would have only $\sum_{i=1}^{N(t)} X_i^2$ I'd know that
$$ E[S(t)] = E[S(t) \mid N(t)] = E[N(t)]E[X_i^2] $$
How can I proceed with the arrival times?

We need to know something about the joint law of $X_i$ and $T_i$ to compute this expectation. I'm going to assume independence since this makes the calculations easier, but if not the only difference will be the calculation of $E[X_iT_i]$.
While your last line is wrong - neither of those equalities is correct - the idea of first calculating $E[S(t)\,|\,N(t)]$ is a good one. But let's break it down even further and calculate the expectation of each of the summands. For the first term, we have $E[X_i^2]=\int x^2f(x)dx=2$, where the second equality is a simple computation using $f(x)=e^{-x}$.
For the other two terms, we need to know the distribution of $T_i$. Recall that $\{T_i-T_{i-1}\}$ is iid where $T_0=0$, so $T_i$ is the sum of $i$ independent copies of $T_1$. We know (or can calculate) $E[T_1]=\frac12$ and $E[T_1^2]=\frac12$. This implies $E[T_i]=\frac i2$ and $E[T_i^2]=\frac i2+2\cdot\frac{i(i+1)}2\cdot\frac12\cdot\frac12=\frac{i(i+3)}4$. Putting this all together (we also need $E[X_i]=1$) we get
$$E[(X_i+T_i)^2]=E[X_i^2]+2E[X_iT_i]+E[T_i^2]=2+i+\tfrac{i(i+3)}4,$$
where the middle term uses the assumed independence of $X_i$ and $T_i$. Now we have
$$E[S(t)\,|\,N(t)]=\sum_{i=1}^{N(t)}E[(X_i+T_i)^2]=\sum_{i=1}^{N(t)}\left[2+i+\frac{i(i+3)}4\right]=\frac{N(t)[N(t)^2+12N(t)+35]}{12}$$
where the last equality can be computed using standard sum identities. Finally we use the fact that $N(t)$ is Poisson of parameter $2t$ and directly calculate:
$$E[S(t)]=E[E[S(t)\,|\,N(t)]]=\sum_{n=0}^\infty\frac{n[n^2+12n+35]}{12}e^{-2t}\frac{(2t)^n}{n!}=\frac23t^3+5t^2+8t.$$
