Let $W\subset U\subset \mathbb{R}^n, V\subset \mathbb{R}^m$ be open sets and $f:U\times V\rightarrow \mathbb{R}^m, g:W\rightarrow V$ differentiable functions. Show that $f(\vec{x},g(\vec{x})), \vec{x} \in W$ is a differentiable function and find its derivative.
So I am kinda confused as to how to start here, as I know that the derivative of a multivariable function is given by its Jacobian, which would be a $m\times n$ matrix (for a $f:\mathbb{R}^n \rightarrow \mathbb{R}^m$), but here the function $f$ is defined on a cartesian product. Is the derivative here going to be a matrix of size $m\times (m+n)$? I am suspecting the use of the chain rule, since $f,g$ are differentiable, but I am confused as to how to write the given function to make use of the rule. I would appreciate a hint on how to start! Thanks in advance.