Using the definition of conditional probability, $$P(\text{$1$ didn't rob} \mid \text{$n$ said $n-1$ robbed}) = \frac{P((\text{$n$ said $n-1$ robbed}) \cap (\text{$1$ didn't rob}))}{P(\text{$n$ said $n-1$ robbed})}.$$ The problem ought to have given you a prior probability for each suspect being the robber. With no further knowledge, one might assume each suspect is equally likely to be the robber.
$$\begin{align} &P((\text{$n$ said $n-1$ robbed}) \cap (\text{$1$ didn't rob})) \\\ &= \sum_{i=2}^n P((\text{$n$ said $n-1$ robbed})\cap (\text{$i$ robbed})) \\\ &= (n-1)\frac{1}{n}(1-p) + \frac{1}{n}\cdot p. \end{align}$$ The denominator can be computed similarly.
* * *
The other conditional probability $P(\text{$1$ didn't rob} \mid \text{$n$ said $n-1$ did not rob})$ can be computed in a similar fashion.