Solution (source code)

= Solution

Assume all <partial derivatives> needed below are continuous. The <multivariable chain rule> is
$$
\boxed{f_x=g_uu_x+g_vv_x,}
$$
where the <partial derivatives> of $g$ are evaluated at $(u(x,y),v(x,y))$. Apply the <product rule> and the <multivariable chain rule> once more:
$$
\begin{aligned}
f_{xx}&=(g_{uu}u_x+g_{uv}v_x)u_x+g_uu_{xx}\\
&\quad +(g_{vu}u_x+g_{vv}v_x)v_x+g_vv_{xx}.
\end{aligned}
$$
<Clairaut's theorem> gives $g_{vu}=g_{uv}$, so
$$
\boxed{f_{xx}=g_uu_{xx}+g_vv_{xx}+g_{uu}u_x^2+2g_{uv}u_xv_x+g_{vv}v_x^2.}
$$
Differentiating $f_x$ with respect to $y$ instead gives
$$
\boxed{f_{xy}=g_uu_{xy}+g_vv_{xy}+g_{uu}u_xu_y+g_{uv}(u_xv_y+v_xu_y)+g_{vv}v_xv_y.}
$$