Given the moment generating function of $X$, find the distribution of $X$ $X$ has MGF $m_{x}(t)=e^{2t}$ for any $t \in \mathbb{R}$. What is the distribution of $X$?
My instructor went about it like this:
$m_{x}(t)=E(e^{xt})=Ee^{2t}+e^{2t}$ Here I am really confused, how did $E(e^{xt})$ become what's on the right hand side of the equation? I wonder if I copied it down wrong...but can someone please explain what he was trying to get at here? 
So $P(X=2)=1$ Also, this is assuming that $X$ is a continuous variable, correct? How can I tell from the problem that $X$ is continuous, not discrete?
 A: 
$m_{x}(t)=E(e^{xt})=Ee^{2t}+e^{2t}$ Here I am really confused, how did $E(e^{xt})$ become what's on the right hand side of the equation?

Simply, the expectation of a constant $c$ is $c$. 
Since $\mathbb E[e^{tX}]=e^{2t}$, by multiplying by the constant $e^{-2t}$ on both sides we obtain $\mathbb E[e^{t(X-2)}]=1$ for each $t$. Differentiating two times and taking the value $t=0$, we obtain that $\mathbb E[(X-2)^2]=0$, hence $\mathbb P(X=2)=1$. 
We didn't make the assumption that $X$ is continuous.
A: Another proof that $X$ is the degenerate random variable almost surely equal to 2 consists in considering the cumulant generating function of $X$, defined as
$$
C_X(t) = \ln \bigl(m_X(t)\bigr).$$
The Taylor-MacLaurin expansion of $C_X$ around $0$ is $$C_X(t) = \kappa_1t + \frac{1}{2!}\kappa_2 t^2 + \ldots...$$ where the first two cumulants are $\kappa_1=\text{E}(X)$ and $\kappa_2=\text{Var}(X)$.
In your case, $C_X(t)=2t$, hence $\kappa_1=2$ and $\kappa_2=0$, wherefrom it is easy to conclude that $X=2$ a.s. 
Note that the 'bare-hands' proof given @Davide has something close to this approach with the cumulant generating function. I prefer his more direct proof, but the cumulant generating function is good to know.
