# Getting the pdf from a Moment generating function

I have to solve the following question:

Let $$X$$ follow the distribution with moment generating function $$M_X(t)$$ and Let $$Y = aX + b$$ follow the distribution with moment generating function $$M_Y(t)$$.

Show that $$M_Y(t) = e^{bt}M_X(at).$$

Now, I know that I need to find the density $$f_Y(y)$$ of $$Y$$ in terms of $$f_X$$ which is
$$f_Y = \frac{1}{a}f_X(\frac{y-b}{a}).$$
The question is, how do I identify the pdf of $$f_X$$ if it has not been stated in the problem what kind of distribution $$X$$ has?
Is there a generic pdf that can be used when the distribution of a random variable is not stated?

You don't need to use the density to show that $$M_Y(t) = e^{tb} M_X(at)$$ (if it is your question).
By definition, the moment generating function of a random variable $$X$$ is: $$M_X(t) = \mathbb{E}[ e^{tX} ]$$
Since $$Y= aX + b$$ we have \begin{align*} M_Y(t) &= \mathbb{E} [ e^{tY} ] \\ &=\mathbb{E} [ e^{t(aX+b)} ] \\ &= \mathbb{E} [ e^{taX + tb} ] \\ &= \mathbb{E} [ e^{taX} e^{tb}] \\ &= e^{tb}\mathbb{E} [ e^{taX} ] \ \ (\text{since} \ e^{tb} \ \text{is constant}) \\ &= e^{tb} M_X(ta) \end{align*}
Here is my suggestion: $$M_Y(t)=\mathbb{E}[e^{tY}] = \mathbb{E}[e^{t(aX+b)}]=\mathbb{E}[e^{atX}e^b]=e^{tb}\mathbb{E}[e^{atX}]=e^{tb}M_X(at)$$