In this answer, I don't understand how this step worked.
Using $\mu_i = \mu^\circ_i + RT\ln \frac{P_i}{\pu{1 bar}}$ \begin{align} \Delta G &= (c\mu^\circ_\ce{C} + d\mu^\circ_\ce{D} - a\mu^\circ_\ce{A} - b\mu^\circ_\ce{B}) + RT \ln\frac{P_\ce{C}^c P_\ce{D}^d}{P_\ce{A}^a P_\ce{B}^b}\\ \Delta G &= \Delta G^\circ + RT\ln Q \end{align}
How does $P_i=\dfrac{P_\ce{C}^c P_\ce{D}^d}{P_\ce{A}^a P_\ce{B}^b}$? And how does that equal the quotient $Q$?
If this is wrong, then please provide me the correct way to proceed from there.