Find an equation of the curve in the $xy$-plane which passes through $(1, 1)$ and which intersects all level curves of the function $f(x, y) = x^2e^y$ orthogonally.
I tried following this: Level curves and intersections, but didn't lead me to the right solution.
$$\nabla f\cdot\nabla g = 2xe^y \frac{\partial g}{\partial x} + x^2e^y\frac{\partial g}{\partial y} = 0$$ $$\frac{\partial g}{\partial x} = \frac{1}{2xe^y}$$ $$\frac{\partial g}{\partial y} = -\frac{1}{x^2e^y}$$
Which gives me the following curve. $$g(x, y) = \frac{1}{2e^y}\ln{x} + \frac{1}{x^2e^y} + C$$
But this seems very wrong as the answer should be $$4y=x^2+3.$$

Well, something’s certainly gone wrong in your solving the differential eqaution since the $g$ that you computed doesn’t satisfy the orthogonality condition, but I think you went astray even before that. In the answer that you reference, the author chose to set $g_x$ and $g_y$ to (up to sign) reciprocals of $f_x$ and $f_y$ to satisfy the orthogonality constraint. That certainly gives you one set of solutions, but it’s certainly not the only one, and is not the easiest way to solve this problem.
Factor your orthogonality equation: $$2xe^yg_x+x^2e^yg_y = xe^y\left(2g_x+xg_y\right) = 0.$$ From this you have ${dy\over dx} = -{g_x\over g_y} = \frac x2$, which will lead you to the given solution. More generally, from the orthogonality condition $\nabla f\cdot\nabla g=0$ you can derive ${dy\over dx}={f_y\over f_x}$, turning the partial differential equation into an ordinary one.