What is the difference between the following problems: (-5)^{2}, -5^{2} and -(5)^{2}

Our text book (Beginning Algebra, fourth edition, published by McGraw Hill, by Streeter, Huthison and Hoetzle) says the second and third problem are exactly the same. I don't see how that can be. Is there a mathematical rule that explains this?

Answered by Penny Nom.