Apply nodal at the non inverting and inverting termial of upper Op amp
at non inveting terminal
$$\frac{V_x-V_{in}}{Rg}+\frac{V_x-V_{out2}}{R_f}=0\tag1$$
at inverting terminal
$$\frac{V_x-V_{out2}}{R_4}+\frac{V_x-V_{out1}}{R_1}=0\tag2$$
Also nodal at the lower op amp inverting terminal
$$\frac{0-V_{out2}}{R_2}+\frac{0-V_{out1}}{R_3}=0\tag3$$
As given \$R_1=R_2=R_3=R_4=R\$
So from equation \$(3)\$
$$V_{out2}=-V_{out1}$$
and from equation \$(2)\$
$$V_x=\frac{V_{out1}+V_{out2}}{2}$$
from this \$V_x=0\$.
Now from equation \$(1)\$
$$V_{out2}=-\frac{V_{in}R_f}{R_g}$$
also
$$V_{out1}=\frac{V_{in}R_f}{R_g}$$
Now the desired output
$$G=\frac{V_{out1}-V_{out1}}{V_{in}}=2\frac{R_f}{R_g}$$