This is a very good question and is also a famous quesion of exponent at social media. Here negative sign is very close to 5 which creating the confusion that -5^2 is equal to (-5)^2 or equal to -(5)^2. It may confused a lot of teacher too.

It seems that question is square of -5 but it is not correct. The exponent is only at 5 and negative sign is without exponent. Let us see that power 2 is only at 5 or at -5 by using algebra. In algebra how we polynomials as .... ?

Let we have a polynomial
3 2
= x - x + 3x + 5
2
Here focus on -x

The exponent is only at x and negative is sign is without exponent. During solution of above polynomial we never convert it toward to positve x^2.

Similarly for further explanation
2
= 7x + 14x + 2
2
Here again focus on 7x .

The exponent is only at x and the co-efficient 7 is without exponent. During solution of above polynomial we never convert 7x^2 to 49x^2 and we can convert 49x^2 if (7x)^2 is given.

We should also understand that the order of operation (BODMAS) is the key of mathematics. and negative sign is take as multiplication so the exponent should be solve before the multiplication so -5^2 mean -(5^2) and -5^2 is not equal to (-5)^2