They are equivalent.
$$\frac{A-P}{P} = \frac{A}{P} - \frac{P}{P} = \frac{A}{P} - 1$$
By the way, these answers are not only equivalent to each other, but also right answers to the question asked.
Let's approach it from the other direction
i = A/P - 1 notice that "1" can be written as P/P
So we have
i = A/P - P/P and since we have a common denominator, we can just write this all over that denominator...so we have....
i = [ A - P ] / P which is exactly the same as the other expression