$Q)$ Let the $Z = X+Y$ (Here the variables $X$ and $Y$ are independent.)
Find the Moment generating function , $M_z(t)$ for $Z = X+Y$
The $f(t)$ is a $P.D.F$ both of the $X$ and $Y$, defined like the below.
$f(t) = \begin{cases} 3e^{-3t} & \text{t $\gt$ 0} \\ 0 & \text{o.w.} \end{cases}$
By definition we can find the $M_z(t)$ for $0<t<3$
$M_z(t) = E(e^{(x+y)t}) = \int\int 9e^{({(t-3)x})({(t-3)y})}dxdy$ = $1 \over (1- {t \over3})^2$
But I tried the different ways by finding the $f_z(z)$ (Surely $f(x,y) = 9e^{-3(x+y)}$)
Let the C.D.F, $F(z) = P(X+Y \leq Z) = \int_{0}^{z}\int_{0}^{z-x} f(x.y)dxdy$
Then P.D.F $f_z(z) = {d \over dz} F(z) = 9ze^{-3z}$ for $z>0$ in my calculation.
Hence $M_z(t) = \int_{0}^{\infty} e^{tz}f_z(z) dz$. But this value is not the $1 \over (1- {t \over3})^2$
What the point did I mistake? Any help would be appreciated.
First, remark that $$M_Z(t)=\mathbb E[e^{tX+tY}]\underset{(1)}{=}\mathbb E[e^{tX}][e^{tY}]\underset{(2)}{=}\mathbb E\left[e^{tX}\right]^2,$$ where $(1)$ comes comes from the independence and $(2)$ from the fact that $X$ and $Y$ are identically distributed.
Now $$M_X(t)=\int_{\mathbb R}e^{tx}f_X(x)\,\mathrm d x,$$ (and not what you wrote), i.e. $$M_X(t)=3\int_{0}^\infty e^{tx}e^{-3x}\,\mathrm d x=3\int_0^\infty e^{(t-3)x}\,\mathrm d x=\frac{3}{t-3}.$$ Therefore $$M_Z(t)=\frac{9}{(t-3)^2},$$ as wished.