Let
$$f(t,x)=e^{ax+bt}, t\in\mathbb R_+, x\in \mathbb R$$
and $Y(t)=f(t,W_t), t \ge 0$. Then $(Y(t),t\ge0)$ is an Ito-process. I shall use Ito's formula and write $Y$ as a sum of initial value, Lebesgue-integral and Ito-integral.
$dY_t=df(t,W_t)=(be^{ax+bt}+\frac{1}{2}a^2e^{ax+bt})dt+ae^{ax+bt}dW_t$
$Y_T=f(T,W_T)=f(0,W_0)+\int_{0}^{T}(be^{ax+bt}+\frac{1}{2}a^2e^{ax+bt})dt+\int_{0}^{T}ae^{ax+bt}dW_t=1+\int_{0}^{T}(be^{ax+bt}+\frac{1}{2}a^2e^{ax+bt})dt+\int_{0}^{T}ae^{ax+bt}dW_t$
I think this is correct so far.
For which values of $a$ and $b$ is $Y$ a martingale?
My answer would be $a=0$ or $ax+bt<0$ so that the last integrand is integrable but I'm not sure.
For which values of $a$ and $b$ is $\int_{0}^{\infty}f(t,W_t)^2dt < \infty$?
$f(t,W_t)^2=e^{2(aW_t+bt)}$. So I think the exponent needs to be $<0$ but I don't know how I can find the values of $a$ and $b$
From applying the Ito's lemma,
$$dY_t=e^{aW_t+bt} \left[\left( b+\frac{1}{2}a^2 \right) dt+adW_t \right].$$
or,
$$\frac{dY_t}{Y_t}= \left( b+\frac{1}{2}a^2 \right) dt+adW_t $$
In order for $Y_t$ to be a martingale, the drift term $(\cdot)dt$ needs to vanish, i.e.
$$b+\frac{1}{2}a^2=0$$
which is the condition on $a$ and $b$. Under such condition,
$$\frac{dY_t}{Y_t}= adW_t $$
or, in its log form,
$$d\ln Y_t= -\frac{1}{2}a^2dt+adW_t $$
After integration, the solution for $Y_T$ is,
$$Y_T=Y_t e^{a(W_T-W_t)-\frac{1}{2}a^2(T-t)}$$
and, as expected of a martingale, its expectation is
$$E_t[Y_T]=Y_t$$
where the exponential expectation
$$E_t \left[e^{a(W_T-W_t)} \right]= e^{\frac{1}{2}a^2(T-t)}$$
is used.