(a) Let $X$ be an exponential random variable with parameter $\lambda$. Find the moment generating function of $X$.
(b) Suppose a continuous random variable $Y$ has moment generating function
$M_Y(s)= \frac{\lambda^2}{(\lambda-s)^2}$ for $s<\lambda$ and $M_Y(s)+\infty$ for $s\ge \lambda$.
Find the probability density function of $Y$.
So (a) is simple. Using $M_X(s)=E(e^{sx})=\int_0^\infty e^{sx}\lambda e^{-\lambda x }dx = \frac{\lambda}{\lambda-s }$ if $s<\lambda$ and $+\infty$ for $s\ge \lambda$.
For (b) I do see a relation between X and Y, that is, $M_Y(s)=(M_X(s))^2$.
Some of my ideas. If I derive $M_Y(s)$ I can obtain the expected value, but I am not sure as to how this can be helpful. I know that this requires manipulation of $M_X(s)$ but I also know that I cannot square the pdf of $X$. I would appreciate some help.