I'll explain my result while you are working it out.
Applying hydrostatics in the manometers we have that (neglecting the weight of the gas):
$$ P_{ref} = P_A + \rho_w g l_A = P_B + \rho_w g l_B $$
$$ \implies P_B = P_A + \rho_w g \left( l_A - l_B\right) \tag{1} $$
This relates the pressures in chamber A to chamber B, put that aside for now.
Next, apply the First Law of Thermodynamics to the control volume(flow properties assumed uniform over section A and B):
$$ \dot E_{cv} = \dot Q_{cv} - \dot W_{cv} + \dot m_A \left( u_A + \frac{P_A}{ \rho_A } + \frac{ V^2_A }{2} + gz_A \right) - \dot m_B \left( u_B + \frac{P_B}{ \rho_B } + \frac{ V^2_B }{2} + gz_B \right)$$
Assumptions:
- Ideal Gas
- Polytropic Process ##PV^{\gamma} = \text{constant}## where for Air ##\gamma = 1.4##
- Steady State ##\dot E = 0## and ## \dot m_A=\dot m_B = \dot m##
- The gas in passing from chamber A to B expands adiabatically (without heat transfer with the surroundings) ##\dot Q_{cv} = 0##
- There is no work the gas is doing on the surroundings nor are the surroundings doing work on the gas in the control volume ## \dot W_{cv} = 0 ##
- The terms ## u + \frac{P}{ \rho }## are combined for convenience into the term referred to as the enthalpy ##h##
- Change in gravitational potential ##\Delta PE = g ( z_A - z_B) = 0 ##
Applying the assumptions to the 1
st Law we are left with:
$$ 0 = h_A - h_B + \frac{V^2_A - V^2_B}{2} \tag{2}$$
The enthalpy terms for an ideal gas are purely functions of temperature and are to be evaluated by engineering thermodynamic tables.
Otherwise, they are defined as:
$$\Delta h = \int c_p dT$$
Where knowledge of how ##c_p## varies with temperature is required to evaluate the integral for a particular gas.
In order to evaluate the change in enthalpy, we are using assumption 2 for the adiabatic expansion of an ideal gas:
$$ T_B = T_A \left( \frac{P_B}{P_A} \right)^{ \frac{ 1- \gamma}{ \gamma } } \tag{3}$$
Subbing 1 into 3 for ##P_B##, we see that the temperature of the flow in chamber B is fully constrained by the initial state ##P_A,T_A## under the adiabatic assumption.
$$ T_B = T_A \left( \frac{ P_A + \rho_w g \left( l_A - l_B\right)}{P_A} \right)^{ \frac{ 1- \gamma}{ \gamma } } \tag{3'}$$
Using this result we will say that:
$$ h_B( T_B) - h_A(T_A)= \frac{V^2_A - V^2_B}{2} \tag{2'}$$
Next the velocity of B as a function of A via continuity (conservation of mass):
$$ \dot m = \rho_A A V_A = \rho_B a V_B $$
Where ##A## and ##a## refer to the cross sectional areas of section A and B respectively.
$$ \implies V_B = \frac{\rho_A}{\rho_B}\frac{A}{a} V_A \tag{4} $$
Subbing ##4## into ##2'##:
$$ h_B( T_B) - h_A(T_A)= \frac{V^2_A - \left( \frac{\rho_A}{\rho_B}\frac{A}{a} \right)^2 V_A^2}{2} \tag{5}$$
$$ \implies h_B( T_B) - h_A(T_A) = \frac{V^2_A}{2} \left( 1 - \left( \frac{\rho_A}{\rho_B} \right)^2 \left( \frac{A}{a} \right)^2 \right) \tag{5} $$
Next we would like to eliminate the density ratio by using the Ideal Gas Law:
$$ \frac{P_A}{P_B} = \frac{ \rho_A}{\rho_B} \frac{T_A}{T_B} $$
$$ \implies \frac{\rho_A}{\rho_B} = \frac{P_A}{P_B} \frac{T_B}{T_A} \tag{6} $$
Plugging ##6## into ##5##:
$$ \implies h_B( T_B) - h_A(T_A) = \frac{V^2_A}{2} \left( 1 - \left( \frac{P_A}{P_B} \frac{T_B}{T_A}\right)^2 \left( \frac{A}{a} \right)^2 \right) \tag{7} $$
Using the adiabatic assumption we can eliminate ## \frac{T_B}{T_A}## in ##7## with ##3## :
$$ \frac{P_A}{P_B} \frac{T_B}{T_A} = \frac{P_A}{P_B} \left( \frac{P_B}{P_A} \right)^{ \frac{ 1- \gamma}{ \gamma } } = \frac{P_B}{P_A}^{(-1)} \left( \frac{P_B}{P_A} \right)^{ \frac{ 1- \gamma}{ \gamma } } = \left( \frac{P_A}{P_B} \right)^{\frac{1}{\gamma}}$$
Subbing that into ##7##:
$$ \implies h_B(T_B) - h_A(T_A) = \frac{V^2_A}{2} \left( 1 - \left( \frac{P_A}{P_B} \right)^{ \frac{2}{\gamma}} \left( \frac{A}{a} \right)^2 \right) \tag{8} $$
##8## can now be rearranged to solve for ##V_A##:
$$ V_A = \sqrt{ \frac{ 2 \left( h_B(T_B) - h_A(T_A) \right) }{ 1 - \left( \frac{P_A}{P_B} \right)^{ \frac{2}{\gamma}} \left( \frac{A}{a} \right)^2 } } \tag{9}$$
Finally the mass flowrate is given by:
$$ \dot m = \rho_A A V_A = \frac{P_A}{R T_A} A \sqrt{ \frac{ 2 \left( h_B(T_B) - h_A(T_A) \right) }{ 1 - \left( \frac{P_A}{P_B} \right)^{ \frac{2}{\gamma}} \left( \frac{A}{a} \right)^2 } } \tag{10}$$
Where ##T_B## is given by:
## T_B = T_A \left( \frac{P_B}{P_A} \right)^{ \frac{ 1- \gamma}{ \gamma } }##
and ##P_B## by:
##P_B = P_A + \rho_w g \left( l_A - l_B\right)##
and the enthalpies ##h(T_B), h(T_A)## evaluated by tables commonly found in Thermodynamic texts.
Thats my best crack at it. Hope it helps.