The paper is Oberfield & Raval 2021.
Consumers have standard Dixit-Stiglitz preferences consuming the bundle
$$Y= \left(\sum_{i \in I} D_{i}^{\frac{1}{\varepsilon}} Y_{i}^{\frac{\varepsilon-1}{\varepsilon}}\right)^{\frac{\varepsilon}{\varepsilon-1}}$$
There are monopolistic plants with a common CES between capital and labor inputs, i.e.
$$Y_{i}=\left[\left(A_{i} K_{i}\right)^{\frac{\sigma-1}{\sigma}}+\left(B_{i} L_{i}\right)^{\frac{\sigma-1}{\sigma}}\right]^{\frac{\sigma}{\sigma-1}}$$.
Let $\alpha_{i} \equiv \frac{r K_{i}}{r K_{i}+w L_{i}}$ and $\alpha \equiv \frac{r K}{r K+w L}$ denote the cost shares of capital at plant level and aggregate level, where $K \equiv \sum_{i \in I} K_{i}$ and $L \equiv \sum_{i \in I} L_{i}$.
The plant-level and aggregate elasticity of substitution is
$$\begin{aligned} \sigma-1 &=\frac{\mathrm{d} \ln r K_{i} / w L_{i}}{\mathrm{~d} \ln w / r}=\frac{\mathrm{d} \ln \alpha_{i} /\left(1-\alpha_{i}\right)}{\mathrm{d} \ln w / r}=\frac{1}{\alpha_{i}\left(1-\alpha_{i}\right)} \frac{\mathrm{d} \alpha_{i}}{\mathrm{~d} \ln w / r}, \\ \sigma^{\mathrm{agg}}-1 &=\frac{\mathrm{d} \ln r K / w L}{\mathrm{~d} \ln w / r}=\frac{\mathrm{d} \ln \alpha /(1-\alpha)}{\mathrm{d} \ln w / r}=\frac{1}{\alpha(1-\alpha)} \frac{\mathrm{d} \alpha}{\mathrm{d} \ln w / r} \end{aligned}$$.
The aggregate cost share of capital can be expressed as $$\alpha=\sum_{i \in I} \alpha_{i} \theta_{i}$$ where $\theta_{i} \equiv \frac{r K_{i}+w L_{i}}{r K+w L}$, and by differentiating $$\sigma^{\mathrm{agg}}-1=\frac{1}{\alpha(1-\alpha)} \sum_{i \in I} \alpha_{i}\left(1-\alpha_{i}\right)(\sigma-1) \theta_{i}+\frac{1}{\alpha(1-\alpha)} \sum_{i \in I} \alpha_{i} \theta_{i} \frac{\mathrm{d} \ln \theta_{i}}{\mathrm{~d} \ln w / r}$$.
For the second term in RHS, the authors say "By Shephard's lemma, a plant's cost share of capital $\alpha_{i}$ measures how relative factor prices affect its mariginal cost" and show that $$\frac{\mathrm{d} \ln \theta_{i}}{\mathrm{~d} \ln w / r}=(\varepsilon-1)\left(\alpha_{i}-\alpha\right)$$.
Then the authors show that "the industry elasticity of substitution is a convex combination of the micro ES and elasticity of demand": $$\sigma^{\mathrm{agg}}=(1-\chi) \sigma+\chi \varepsilon$$ where $\chi \equiv \sum_{i \in I} \frac{\left(\alpha_{i}-\alpha\right)^{2}}{\alpha(1-\alpha)} \theta_{i}$.
Question 1: How to illustrate the claim "By Shephard's lemma, a plant's cost share of capital $\alpha_{i}$ measures how relative factor prices affect its mariginal cost" and to derive the $\frac{\mathrm{d} \ln \theta_{i}}{\mathrm{~d} \ln w / r}$?
Question 2: How to derive the $\sigma^{\mathrm{agg}}=(1-\chi) \sigma+\chi \varepsilon$?