If you have $X$ distributed as a $\mathrm{Bernoulli}(p)$ and $Y$ as a $\mathrm{Exponential}(\lambda)$ find $Z=XY$.
I tried doing it with the MFG i.e. $$E[e^{tZ}]=E[e^{tXY}]=E[E[e^{tXY}|_{X=x}]=E[E[e^{txY}]|_{X=x}]$$ but this is where I got stuck, I don´t know if this is the proper way to solve this, I would appreciate a step-by-step explanation.
$E[e^{tXY}]=(1-p)E[e^{tY \times 0}] + pE[e^{tY \times 1}] =(1-p)E[1] + pE[e^{tY}]$. Does that help?