It usually helps to follow Fourier's prescription rather than jump to the solution. For Laplace's equation, the separated solutions $X(x)Y(y)$ satisfy
$$
X''Y+XY'' = 0, \\
\frac{X''}{X} = -\frac{Y''}{Y} = \lambda,
$$
where $\lambda$ is a separation parameter. So the Fourier ODEs are
$$
\begin{align}
X''=\lambda X, &\;\;\;\;\; Y''=-\lambda Y \\
0 < x < a, & \;\;\;\;\;0 < y < \infty \\
X(0) = 0, & \;\;\;\;\; Y'(0) = 0.
\end{align}
$$
Fourier always assumed the separated solutions were bounded on any unbounded domain. The conditions for $X$ do not determine parameters $\lambda$; however the boundedness of $Y$ in conjunction with $Y'(0)=0$ forces $\lambda \ge 0$. (If $\lambda < 0$ then $Y(y)=\cosh(\sqrt{\lambda}y)$ is unbounded.) Therefore, $\lambda \ge 0$ is assumed, and the separated solutions for $\lambda=\mu^{2}$ satisfying the above conditions are
$$
X_{\mu}(x)Y_{\mu}(y) = C(\mu)\sinh(\mu x)\cos(\mu y).
$$
A sum of these must be an integral sum:
$$
u(x,y) = \int_{0}^{\infty}C(\mu)\sinh(\mu x)\cos(\mu y)dy.
$$
The coefficient function $C(\mu)$ is the only missing component, and must be chosen so that
$$
g(y) = u(a,y) = \int_{0}^{\infty}C(\mu)\sinh(\mu a)\cos(\mu y)dy.
$$
Writing $g$ as a Fourier cosine transform gives
$$
g(y) = \frac{2}{\pi}\int_{0}^{\infty}\left(\int_{0}^{\infty}\cos(\mu u)g(u)du\right)\cos(\mu y)d\mu,
$$
which leads to
$$
C(\mu)\sinh(\mu a) = \frac{2}{\pi}\int_{0}^{\infty}\cos(\mu u)g(u)du \\
C(\mu) = \frac{2}{\pi\sinh(\mu a)}\int_{0}^{\infty}\cos(\mu u)g(u)du.
$$
The final Fourier solution is
$$
u(x,y) = \frac{2}{\pi}\int_{0}^{\infty}\left(\frac{1}{\sinh(\mu a)}
\int_{0}^{\infty}\cos(\mu u)g(u)du\right)\sinh(\mu x) \cos(\mu y)d\mu.
$$
Sanity Check: Note that the expression in parentheses is a function of $\mu$ only--it is $C(\mu)$. Visual inspection of the final, proposed solution shows that $u(a,y)$ is the inverse Fourier cosine transform of the Fourier cosine transform of $g$. So $u(a,y)=g(y)$ under suitable smoothness conditions on $g$. Cleary $u(0,y)=0$. Under suitable assumptions to ensure the convergence of the differentiated integral expression, $u_{y}(x,0)=0$ follows. All of the required conditions check, and this does give a solution of Laplace's equation given sufficient convergence of the different derived series.
Indeed, this problem should be solved with Fourier cosine transform rather than Fourier transform. If you use Fourier transform, you won't be able to take the b.c. at $x=0$ into consideration, and the equation will then be solved in $-\infty<x<\infty$ with implicit b.c.s at $\pm\infty$. (For this part check this post for more information. )
The key point is, when $f(\infty)=0$, Fourier cosine transform
$$
\mathcal{F}_t^{(c)}[f(t)](\omega)=\sqrt{\frac{2}{\pi }}\int _0^{\infty } f(t) \cos (\omega t) d t
$$
has the following property:
$$
\mathcal{F}_t^{(c)}\left[f''(t)\right](\omega)=-\omega^2 \mathcal{F}_t^{(c)}[f(t)](\omega)-\sqrt{\frac{2}{\pi }} f'(0)
$$
You can easily verify this property using integration by parts.
So, by applying this property on your equation, we have
$$
\mathcal{F}_x^{(c)}\left[u^{(1,0)}(t,x)\right](\omega )=k \left(-\omega ^2 \mathcal{F}_x^{(c)}[u(t,x)](\omega )-\sqrt{\frac{2}{\pi }} u^{(0,1)}(t,0)\right)-a k \mathcal{F}_x^{(c)}[u(t,x)](\omega )
$$
Substitute the b.c. into the equation, we obtain a simple initial value problem (IVP) of linear ODE:
$$U'(t)=-a k U(t)-k \omega ^2 U(t)$$
$$U(0)=F$$
where $U(t)=\mathcal{F}_x^{(c)}[u(t,x)](\omega )$, $F=\mathcal{F}_x^{(c)}[f(x)](\omega)$.
If you have difficulty in solving the IVP, check the wikipedia page). Anyway, we can easily find its solution:
$$U(t)=F e^{-k t \left(a + \omega ^2\right)}$$
The last step is to transform back with inverse Fourier Cosine transform
$${\mathcal{F}_\omega^{(c)}}^{-1}[F(\omega)](t)=\sqrt{\frac{2}{\pi }} \int_0^{\infty } F(\omega ) \cos (t \omega) \, d\omega $$
and the solution is
$$
u(t,x)=\sqrt{\frac{2}{\pi }} \int_0^{\infty } e^{-k t \left(a + \omega ^2\right)} \mathcal{F}_x^{(c)}[f(x)](\omega ) \cos (\omega t) \, d\omega
$$
Notice this solution is probably the same as the one given by doraemonpaul. I guess he has just chosen a different convention for Fourier parameters.
Best Answer
Remember, $t$ is a parameter in these situations. Being infinite in $t$ was not what I meant when I said infinite domain $\implies$ Fourier Transform..
However, $x$ and $y$ are dimensions, these are what I meant when I said infinite domain $\implies$ Fourier Transform. Notice in your last two examples, your PDEs depended on $x$ and $y$ but not $t$, and you needed to Fourier Transform both of them. This is because the domain of $x$ or $y$ (or both) in those examples is infinite.
So, in summary
1. If you see $t \gt 0$, that does not mean you have an infinite domain.
2. If you see $x, y \in (-\infty, \infty)$ or some variation of this, use Fourier Transform. If the domain is discrete (i.e. $x, y \in (a, b), \ a, b \in \mathbb{R}$) then use Fourier Series.