I'm solving question (1) and (2) of this exercise:
The transport theorem is given in my lecture as
Let $X$ be a continuous random variable and $\varphi$ a real continuous function on the support of $X$. If $\mathbb{E}(|\varphi(X)|)<+\infty$, then $$\mathbb{E}(\varphi(X))=\int_{\mathbb{R}} \varphi(x) f_{X}(x) \, d x$$
Clearly, $S_n$ is a discrete random variable.
Could you please explain how to calculate $\mathbb{E}\left(T_{n}\right)$ and $\mathbb{E}\left(T^2_{n}\right)$? Thank you so much for your help!

By independence of $X_1,\ldots, X_n$, $$\mathbb{E} T_n = \mathbb{E} (1-\frac{1}{n})^{S_n} = \prod_{i=1}^n \mathbb{E}(1-\frac{1}{n})^{X_i}.$$ Each term in the product is $$\mathbb{E}(1-\frac{1}{n})^{X_i} = \sum_{k=0}^\infty (1-\frac{1}{n})^k P(X_i = k) = \sum_{k=0}^\infty (1-\frac{1}{n})^k e^{-\lambda} \frac{\lambda^k}{k!} = e^{-\lambda} e^{\lambda(1-\frac{1}{n})} = e^{-\lambda/n},$$ where we have used the Taylor series of the exponential function. The other expectation can be computed similarly.