Rewriting some equations of your problem for convenience
$$h(x) = h_1(x), \, h(y) = h_2(y)$$
$$g(x,y) = \left[\begin{matrix}g_1(x,y)\\g_2(x,y)\end{matrix}\right]$$
$$f(h(x),g(x,y),h(y)) = f(h_1(x),g_1(x,y),g_2(x,y),h_2(y)) = \left[\begin{matrix}f_1(h_1(x),g_1(x,y),g_2(x,y),h_2(y))\\f_2(h_1(x),g_1(x,y),g_2(x,y),h_2(y))\end{matrix}\right] = \left[\begin{matrix}0\\0\end{matrix}\right]$$
$$J_f(h_1(x),g_1(x,y),g_2(x,y),h_2(y)) = \left[\matrix{\frac{\partial f_1}{\partial h_1}\\\frac{\partial f_2}{\partial h_1}}\matrix{\frac{\partial f_1}{\partial g_1}\\\frac{\partial f_2}{\partial g_1}}\matrix{\frac{\partial f_1}{\partial g_2}\\\frac{\partial f_2}{\partial g_2}}\matrix{\frac{\partial f_1}{\partial h_2}\\\frac{\partial f_2}{\partial h_2}}\right]$$
$$J_g(x,y) = \left[\matrix{\frac{\partial g_1}{\partial x}\\\frac{\partial g_2}{\partial x}}\matrix{\frac{\partial g_1}{\partial y}\\\frac{\partial g_2}{\partial y}}\right]$$
$$J_{h_1}(x) = \frac{\partial h_1}{\partial x}$$
$$J_{h_2}(y) = \frac{\partial h_2}{\partial y}$$
From the chain rule, we know that for $i={1,2}$
$$ \frac{\partial f_i}{\partial x} = 0 = \frac{\partial f_i}{\partial h_1} \frac{\partial h_1}{\partial x} + \frac{\partial f_i}{\partial g_1} \frac{\partial g_1}{\partial x} + \frac{\partial f_i}{\partial g_2} \frac{\partial g_2}{\partial x} $$
$$ \frac{\partial f_i}{\partial y} = 0 = \frac{\partial f_i}{\partial h_2} \frac{\partial h_2}{\partial y} + \frac{\partial f_i}{\partial g_1} \frac{\partial g_1}{\partial y} + \frac{\partial f_i}{\partial g_2} \frac{\partial g_2}{\partial y} $$
It is given that
$J_f(h(x_0),g_1(x_0,y_0),g_2(x_0,y_0),h(y_0)) = \bigg[\matrix{1\\-2}\matrix{7\\0}\matrix{0\\-5}\matrix{2\\5}\bigg], J_{h_1}(x_0) = \big[\matrix{14}\big], J_{h_2}(y_0) = \big[\matrix{10}\big]$
So it is possible to write the system
$$ 14 + 7 \frac{\partial g_1}{\partial x} (x_0,y_0) = 0 $$
$$ 20 + 7 \frac{\partial g_1}{\partial y} (x_0,y_0) = 0 $$
$$ -28 -5 \frac{\partial g_2}{\partial x} (x_0,y_0) = 0 $$
$$ 50 - 5 \frac{\partial g_2}{\partial y} (x_0,y_0) = 0 $$
Best Answer
When you are given a matrix-valued function ${\bf x}\to A({\bf x})$ and know for sure that it is the Jacobian of some vector-valued function $${\bf f}:\quad{\mathbb R}^n\to{\mathbb R}^m,\qquad {\bf x}\to{\bf f}({\bf x})$$ then it is easy to recover ${\bf f}$ from $A$. Indeed, the columns of $A$ are nothing else but the partial derivatives $${\bf f}_{.k}({\bf x})=\left({\partial f_1\over\partial x_k},{\partial f_2\over\partial x_k},\ldots,{\partial f_m\over\partial x_k}\right)\qquad(1\leq k\leq n)\ ,$$
and assuming ${\bf x}_0={\bf y}_0={\bf 0}$ it is pretty obvious that we have $${\bf f}({\bf x})=\int_0^{x_1}{\bf f}_{.1}(t,0,\ldots,0)\ dt+\int_0^{x_2}{\bf f}_{.2}(x_1,t,0,\ldots,0)\ dt+\ldots+\int_0^{x_n}{\bf f}_{.n}(x_1,\ldots, x_{n-1},t)\ dt\ .$$ This comes from integrating the partial derivatives of ${\bf f}$ along a multi-L-shaped path with legs parallel to the coordinate axes from ${\bf 0}$ to ${\bf x}$. A coordinate-free way to write ${\bf f}$ would be $${\bf f}({\bf x})=\int_0^1 A(t{\bf x}).{\bf x}\ dt\ .$$
The deep problem here is somewhere else: You cannot give an arbitrary matrix-valued function ${\bf x}\to A({\bf x})$ and hope that there is a function ${\bf x}\to{\bf f}({\bf x})$ with $d{\bf f}({\bf x})=A({\bf x})$ for each ${\bf x}$. There are so-called integrability conditions as soon as $n\geq2$, corresponding to the condition ${\rm curl}\,{\bf F}={\bf 0}$ for a vector field ${\bf F}$ in ${\mathbb R}^3$ to be a gradient field $\nabla f$. To put it simply: These conditions encode that the mixed second partials of the prospective ${\bf f}$ should be equal.
Given a matrix-valued function ${\bf x}\to A({\bf x})=\bigl[a_{ik}({\bf x})\bigr]_{1\leq i\leq m, \ 1\leq k\leq n}$ on a simply connected domain $\Omega\subset{\mathbb R}^n$ the integrability conditions read as follows: $${\partial a_{ik}({\bf x})\over\partial x_l}\equiv {\partial a_{il}({\bf x})\over\partial x_k}\quad({\bf x}\in\Omega, \ 1\leq i\leq m, \ 1\leq k<l\leq n)\ .$$ So there are $m\cdot{n\choose 2}$ of them.