The most important point to make regarding multi-phase reaction equilibrium is that now you must satisfy both the phase equilibrium criteria and the reaction equilibrium criterion. That is, the fugacity of each species is equal in each phase (so for species $i$ in a three phase ($\alpha, \beta, \gamma$ phases):

$\hat f_i^{\alpha} = \hat f_i^{\beta} = \hat f_i^{\gamma}$

In addition, the reaction equilibrium condition still holds:

$K = \Pi_i \left [\frac{\hat f_i}{f_i^o} \right ]^{\nu_i} $

If we had the following reaction:

$A(g) + B(s) \Longleftrightarrow 2C(g)$

we would write:

$K = \left [\frac{\left (\frac{\hat f_{C_{g}}}{f_{C_{g}}^o}\right )^2}{\left (\frac{\hat f_{A_{g}}}{f_{A_{g}}^o}\right )\left (\frac{\hat f_{B_{s}}}{f_{B_{s}}^o}\right )} \right ] $

We would take the gas phase as our reference for both $A$ and $C$, so that each of those would give $\hat f_i = y_i \hat \phi_iP_{tot}(bar)$. We would take the solid phase as reference for materials $B$. If no $A$ or $C$ dissolves in the solid, this expression becomes very simple since $x_B = 1$ so $\gamma_B = 1$ and we then simply need to worry about using the Poynting correction for the term $f_B/f_B^o$ (note no "hat" since it is pure), which is often equal to 1 anyway.

Making all of these simplifications gives us:

$K = \left [\frac{\left (y_C \hat \phi_C P_{tot}\right )^2}{\left (y_A \hat \phi_A P_{tot}\right )\left (x_B\right )} \right ] $

Note that $x_B = 1$ and is only shown here to highlight the fact
that this expression includes mole fractions **by
phase** where necessary. Also, we took the Poynting
correction for $B$ to be 1.

It is useful to discuss further the choice of $f_i^o$.

On the one hand, your choice of $f_i^o$ must match your
**value** of $K$. In other words, your reference phase
for each species must match the state of aggregation that is used
to calculate $\Delta g_{rxn}^o$ in the expression:

$K = exp\left [-\frac{\Delta g_{rxn}^o}{RT}\right ]$

On the other hand, it is relatively easy to use a different $\Delta g_{f_i}^o$ in order to enable whatever reference phase you want.

If there is immiscibility between any of the phases (that is, if any of the phases remain pure because nothing mixes into it ... as with a solid, for example), it is useful to choose the pure species as a reference for that material since the $f_i/f_i^o$ term would depend only on pressure and any mole fractions, activity coefficients, or fugacity coefficients would be equal to 1 (since the material is pure).

Determine the equilibrium composition for a multiphase, single-reaction system