Answer
a) $P=\frac{A}{(1+\frac{r}{n})^{nt}}$
b) $\dfrac{\log_{1+\frac{r}{n}}{\frac{A}{P}}}{n}$
Work Step by Step
a) $A=P(1+\frac{r}{n})^{nt}\\P=\frac{A}{(1+\frac{r}{n})^{nt}}$
b) $A=P(1+\frac{r}{n})^{nt}\\\frac{A}{P}=(1+\frac{r}{n})^{nt}\\\log_{1+\frac{r}{n}}{\frac{A}{P}}=nt\\t=\dfrac{\log_{1+\frac{r}{n}}{\frac{A}{P}}}{n}$