With negative numbers, how do we know when the negative sign indicates that it is a subtraction or it is a negative number?

This is a question from Khan Academy:
(−5+7×1)−9×5
If you calculate the equation in the parentheses which equals 2, then the equation becomes 2-9x5. At this point, would you calculate the 9x5 part as 9 x 5 then subtract 2 or -9 x 5 then add 2. I know that this isn't the greatest example since it would equal -43 regardless but there are some equations where it would change the entire equation.