Solution (source code)

= Solution

Use the <squaring map from a quadrant to the upper half-plane>:
$$
(x+iy)^2=(x^2-y^2)+i(2xy).
$$
By <conformal invariance of harmonicity>, the answer is
$$
\boxed{g(x,y)=f(x^2-y^2,2xy).}
$$
On the horizontal axis it gives $f(x^2,0)=e^{-x^2}$, and on the vertical axis it gives $f(-y^2,0)=e^{-y^2}$. Also $|(x+iy)^2|=x^2+y^2$, so spatial infinity maps to spatial infinity and the required decay follows. The two boundary values agree at the origin.