Applying Bernoulli’s equations at sections 1 and 2 for an adiabatic process, we have:
( γ γ − 1 ) p 1 ρ 1 g + V 1 2 2 g + z 1 = ( γ γ − 1 ) p 2 ρ 2 g + V 2 2 2 g + z 2 \Big(     \cfrac{\gamma}{\gamma-1}    \Big) \dfrac{p_1}{\rho_1g} + \dfrac{V^2_1}{2g} +z_1=\Big(     \cfrac{\gamma}{\gamma-1}    \Big) \dfrac{p_2}{\rho_2g} + \dfrac{V^2_2}{2g} +z_2 ( γ − 1 γ  ) ρ 1  g p 1   + 2 g V 1 2   + z 1  = ( γ − 1 γ  ) ρ 2  g p 2   + 2 g V 2 2   + z 2  
For the following situation we know that p1 =78 kN/m2  and p2 =117 kN/m2 , T 1 = 40   ° C = 313   K T_1=40\,{°C}=313\,K T 1  = 40 ° C = 313 K 1 = 300 m/s, R = 287 J/kg K and γ = 1.4. Since this is a horizontal pipe z 1 = z 2 z_1=z_2 z 1  = z 2  g g g 
( γ γ − 1 ) p 1 ρ 1 g + V 1 2 2 g = ( γ γ − 1 ) p 2 ρ 2 g + V 2 2 2 g \Big(     \cfrac{\gamma}{\gamma-1}    \Big) \dfrac{p_1}{\rho_1\cancel{g}} + \dfrac{V^2_1}{2\cancel{g}} =\Big(     \cfrac{\gamma}{\gamma-1}    \Big) \dfrac{p_2}{\rho_2\cancel{g}} + \dfrac{V^2_2}{2\cancel{g}} ( γ − 1 γ  ) ρ 1  g  p 1   + 2 g  V 1 2   = ( γ − 1 γ  ) ρ 2  g  p 2   + 2 g  V 2 2   
Following this, we separate the terms of velocity from the density and pressure relations:
( γ γ − 1 ) p 1 ρ 1 − ( γ γ − 1 ) p 2 ρ 2 = V 2 2 2 − V 1 2 2 \Big(     \cfrac{\gamma}{\gamma-1}    \Big) \dfrac{p_1}{\rho_1} -\Big(     \cfrac{\gamma}{\gamma-1}    \Big) \dfrac{p_2}{\rho_2}= \dfrac{V^2_2}{2}-\dfrac{V^2_1}{2} ( γ − 1 γ  ) ρ 1  p 1   − ( γ − 1 γ  ) ρ 2  p 2   = 2 V 2 2   − 2 V 1 2   
We continue to simplify because we need to find V2 :
V 2 2 = V 1 2 + ( 2 γ γ − 1 ) ( p 1 ρ 1 − p 2 ρ 2 ) = V 1 2 + ( 2 γ γ − 1 ) p 1 ρ 1 ( 1 − ρ 1 p 1 p 2 ρ 2 ) V^2_2=V^2_1+\Big(     \cfrac{2\gamma}{\gamma-1}    \Big)\Big(   \dfrac{p_1}{\rho_1} -\dfrac{p_2}{\rho_2}   \Big) =V^2_1+\Big(     \cfrac{2\gamma}{\gamma-1}    \Big)\dfrac{p_1}{\rho_1}\Big(1    -\dfrac{\rho_1}{p_1}\dfrac{p_2}{\rho_2}   \Big) V 2 2  = V 1 2  + ( γ − 1 2 γ  ) ( ρ 1  p 1   − ρ 2  p 2   ) = V 1 2  + ( γ − 1 2 γ  ) ρ 1  p 1   ( 1 − p 1  ρ 1   ρ 2  p 2   ) 
From the adiabatic relations between the pressure and density, we can find the relation of densities in terms of the pressures:
p 1 ρ 1 γ = p 2 ρ 2 γ    ⟹    p 1 p 2 = ( ρ 1 ρ 2 ) γ \dfrac{p_1}{\rho^{\gamma}_1} =\dfrac{p_2}{\rho^{\gamma}_2}  \implies  \dfrac{p_1}{p_2} =\Big(\cfrac{\rho_1}{\rho_2} \Big)^{\gamma} ρ 1 γ  p 1   = ρ 2 γ  p 2   ⟹ p 2  p 1   = ( ρ 2  ρ 1   ) γ 
   ⟹    ρ 1 ρ 2 = ( p 1 p 2 ) 1 / γ \implies \cfrac{\rho_1}{\rho_2} =\Big(\dfrac{p_1}{p_2} \Big)^{1/\gamma} ⟹ ρ 2  ρ 1   = ( p 2  p 1   ) 1/ γ 
We substitute the last expression for V 2 2 V^2_2 V 2 2  
V 2 2 = V 1 2 + ( 2 γ γ − 1 ) p 1 ρ 1 ( 1 − p 2 p 1 ( p 1 p 2 ) 1 / γ ) V^2_2=V^2_1+\big(     \frac{2\gamma}{\gamma-1}    \big)\dfrac{p_1}{\rho_1}\bigg(1    -\dfrac{p_2}{p_1} \Big(\dfrac{p_1}{p_2} \Big)^{1/\gamma}  \bigg) V 2 2  = V 1 2  + ( γ − 1 2 γ  ) ρ 1  p 1   ( 1 − p 1  p 2   ( p 2  p 1   ) 1/ γ ) 
Following simplification gives us a new expression for V 2 2 V^2_2 V 2 2  
V 2 2 = V 1 2 + ( 2 γ γ − 1 ) p 1 ρ 1 ( 1 − ( p 2 p 1 ) 1 − 1 / γ ) V^2_2=V^2_1+\big(     \frac{2\gamma}{\gamma-1}    \big)\dfrac{p_1}{\rho_1}\bigg(1 - \Big(\dfrac{p_2}{p_1} \Big)^{1-1/\gamma}  \bigg) V 2 2  = V 1 2  + ( γ − 1 2 γ  ) ρ 1  p 1   ( 1 − ( p 1  p 2   ) 1 − 1/ γ ) 
Now we have an espression that will give us the value for V2 , but we need to know or calculate the following:
p 1 ρ 1 = R T 1 = ( 287 J k g K ) ( 313   K ) = 89831 m 2 s 2 \dfrac{p_1}{\rho_1}=RT_1=(287 \frac{J}{kg K})(313\,K)=89831 \frac{m^2}{s^2} ρ 1  p 1   = R T 1  = ( 287 k g K J  ) ( 313 K ) = 89831 s 2 m 2  
p 2 p 1 = 117 k N m 2 78 k N m 2 = 1.5 \dfrac{p_2}{p_1}=\dfrac{117\frac{kN}{m^2}}{78\frac{kN}{m^2}}=1.5 p 1  p 2   = 78 m 2 k N  117 m 2 k N   = 1.5 
After that we continue with the substitution:
V 2 2 = ( 300 m s ) 2 + ( 2 ( 1.4 ) 1.4 − 1 ) ( 89831 m 2 s 2 ) ( 1 − ( 1.5 ) 1 − 1 1.4 ) V^2_2=(300\frac{m}{s})^2+\big(     \frac{2(1.4)}{1.4-1}    \big)(89831\frac{m^2}{s^2})\bigg(1 - \Big(1.5 \Big)^{1-\frac{1}{1.4}}  \bigg) V 2 2  = ( 300 s m  ) 2 + ( 1.4 − 1 2 ( 1.4 )  ) ( 89831 s 2 m 2  ) ( 1 − ( 1.5 ) 1 − 1.4 1  ) 
At last, we have:
V 2 2 = 12781.27 m 2 s 2    ⟹    V 2 = 113.05 m s V^2_2=12781.27\cfrac{m^2}{s^2}\implies V_2=113.05\cfrac{m}{s} V 2 2  = 12781.27 s 2 m 2  ⟹ V 2  = 113.05 s m  
In conclusion the velocity of the gas at th second section is  V 2 = 113.05 m s V_2=113.05\cfrac{m}{s} V 2  = 113.05 s m   . 
Reference: 
Rajput, R. K. (2005).  A textbook of engineering thermodynamics . Laxmi Publications. 
Comments