How can I simplify
$$x^2\frac{\partial^2u}{\partial x^2}+2xy\frac{\partial^2u}{\partial x \partial y}+y^2\frac{\partial^2u}{\partial y^2}=r^2\frac{\partial^2 g}{\partial r^2},$$
by changing coordinates from Cartesian to polar coordinates $(x,y)\mapsto(r,\varphi)$, $u(x,y)=g(r,\varphi)$ ?
You can use the chain rule. And it's easier to start from the right hand side. We use $$x=r\cos\varphi\\y=r\sin\varphi$$ Then we calculate the partial derivative of $g$ with respect to $r$: $$\frac{\partial g}{\partial r}=\frac{\partial g}{\partial x}\frac{dx}{dr}+\frac{\partial g}{\partial y}\frac{dy}{dr}=\cos\varphi\frac{\partial u}{\partial x}+\sin\varphi\frac{\partial u}{\partial y}$$ We apply the formula again to get the second derivative: $$\begin{align}\frac{\partial^2 g}{\partial r^2}&=\cos\varphi\frac{\partial}{dx}\frac{\partial g}{\partial r}+\sin\varphi\frac{\partial}{dy}\frac{\partial g}{\partial r}\\&=\cos\varphi(cos\varphi\frac{\partial^2u}{\partial x^2}+\sin\varphi\frac{\partial^2u}{\partial x\partial y})+\sin\varphi(cos\varphi\frac{\partial^2u}{\partial x\partial y}+\sin\varphi\frac{\partial^2u}{\partial y^2})\\&=\cos^2\varphi\frac{\partial^2u}{\partial x^2}+2\sin\varphi\cos\varphi\frac{\partial^2u}{\partial x\partial y}+\sin^2\varphi\frac{\partial^2u}{\partial y^2}\end{align}$$ Now multiply with $r^2$ both sides, and you get your answer.