Deriving aggregate output from labor demand and supply
Use $W_{i}=V \cdot \frac{P_{i}^{\beta}}{Z_{i}}=VQ_i$, then $$L_{i}=\left(\frac{\alpha^{1-\eta} \eta^{\eta}}{R^{\eta}} \cdot \frac{A_{i}}{(V_{i} Q_{i})^{1-\eta}}\right)^{\frac{1}{1-\alpha-\eta}} \cdot T_{i}$$ and $$\sum L_i = {\left({\frac{\alpha}{V}}\right)}^{\frac{1-\eta}{1-\alpha-\eta}} {\left({\frac{\eta}{R}}\right)}^{\frac{\eta}{1-\alpha-\eta}} \sum\left(\frac{A_i}{Q_i^{1-\eta}}\right)^{\frac{1}{1-\alpha-\eta}}T_i = 1$$ $$\frac{V}{\alpha} = {\left({\frac{\eta}{R}}\right)}^{\frac{\eta}{1-\eta}} \left(\sum\left(\frac{A_i}{Q_i^{1-\eta}}\right)^{\frac{1}{1-\alpha-\eta}}T_i\right)^{\frac{1-\alpha-\eta}{1-\eta}}  $$.
Use the FOC on labor, $W_i=\alpha \frac{Y_i}{L_i}$, then $$\sum Y_i = \frac{V}{\alpha}\sum L_iQ_i = \frac{V}{\alpha} \bar{Q}$$, and replace $\frac{V}{\alpha}$ with above equation then you get equation (7).