It exists no closed-form expression for $i$ if $n>1$. Let $1+i=q$, your second equation becomes
$P=PMT\cdot \frac{q^n-1}{(q-1)\cdot q^n}$
Multiplying both sides by $(q-1)\cdot q^n$
$P\cdot (q-1)\cdot q^n=PMT\cdot (q^n-1)$
Multiplying out the brackets
$P\cdot q^{n+1}-P\cdot q^n=PMT\cdot q^n-PMT$
$P\cdot q^{n+1}-(P+PMT)\cdot q^n+PMT=0$
This is a polynomial with a degree of $n+1$. For $n=1$ it is a quadratic equation. It can be solved by using the quadratic formula. For $n=2$ the cardano formula can be maybe used. But for $n>2$ there exist no closed-form formula. In general you have to apply an approximation method, for instance the Newton-Raphson method.