Solution (source code)

= Solution

Fourier transformation in $x$ changes Laplace's equation into
$$
\widetilde u_{yy}-k^2\widetilde u=0.
$$
Imposing the two boundary values gives
$$
\boxed{
\widetilde u(k,y)=
\frac{\widetilde f(k)\sinh(|k|(a-y))
+\widetilde g(k)\sinh(|k|y)}{\sinh(|k|a)}}.
$$
The value at $k=0$ is understood by continuity.