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.
Firstly I replace $r/n$ by $t$. The LHS of the first equation is
$$\frac{P}{\frac{1-(1+t)^{-n}}{t}}$$
In order to divide $P$ by the fraction we multiply $P$ with the reciprocal.
$$\frac{P\cdot t }{1-(1+t)^{-n}}$$
Expanding the fraction by $(1+t)^{n}$
$$\frac{P\cdot t \cdot (1+t)^{n} }{(1+t)^{n}-1}$$