How do you go from $\log P = \log N$ to the next step?
Two positive real numbers are equal if and only if their logarithms are equal. This is because $\log$ is a strictly increasing function that grows without bound and is defined for all positive reals: it is, therefore, a bijection from $\mathbb{R}_{&gt;0}$ to&nbsp;$\mathbb{R}$.

Clearly, if $x=y$ then $\log x=\log y$. If $x\neq y$ then suppose $x&gt;y$ (the case $x&lt;y$ is identical). Because $\log$ is strictly increasing, $x&gt;y$ implies that $\log x&gt;\log y$ so, in particular, $\log x\neq \log y$.  Therefore, $x=y$ if, and only if, $\log x=\log y$.