I have two equations
$$\dfrac{\dfrac{P}{1-(1+\frac rn)^{-n}}}{\frac rn}=x$$
and
$$\dfrac{P\cdot\frac rn\cdot(1+\frac rn )^n}{(1+\frac rn)^{n}-1}= x.$$
If I put in an amount for $P$, $r$, and $n$ I get the same answer in each formula but I cannot figure out how to simplify the second one to see if they are truly the same formula in different formats.