The first equation is easier. The solution is based on the bit of knowledge that $G=\mathbb{Z}/p\mathbb{Z}^*$ is a cyclic group of order $p-1$. Let $d=\gcd(n,p-1)$.
In a cyclic group of order $p-1$ the number of solutions of $x^n=1$ is equal to $d$.
We can find these $d$ solutions, at least in theory, as follows. Let $g$ be a primitive
element, i.e. a generator of $G$, so
$$G=\{g^0=1,g^1,g^2,\ldots,g^{p-2}\}.$$
The solution is based on the fact that $g^j\equiv 1$, if and only if $(p-1)\mid j$.
So $x=g^j$ is a solution of the equation $x^n=1$, if and only if $(p-1)\mid jn$.
Here always $d\mid n$, so this holds if and only if $(p-1)/d \mid j$.
Thus all the distinct solutions are
$$
g^{j(p-1)/d},\ \text{for}\ j=0,1,\ldots,d-1.
$$
The other equation is a bit trickier. We need the bit that $-1\equiv g^{(p-1)/2}$.
This follows from the earlier part in the sense that the solutions to $x^2=1$ are $x=\pm1$. Therefore $x=g^j$ is a solution of $x^n=-1$, if and only if
$$
nj\equiv (p-1)/2 \pmod{p-1}.
$$
Here $nj$ is always divisible by $d$ that is also a factor of the modulus $(p-1)$.
So if $d$ is not a factor of $(p-1)/2$ there will be no solutions. But
if $d\mid(p-1)/2$, then $j=j_0=(p-1)/2d$ is one solution, and, as in the case of the first eqaution we get the others $j_k$ from the formula
$j_k=j_0+kd$, $k=1,2,\ldots, d-1.$