Do you mean x^2 - 25 = 0?
It's basically "What two factors multiply together to get that?" You know it's only two factors because it's only x^2, if it was x^3 or more you'd have three factors or more, depending on to what degree that ^n is.
That would be (x-5) and (x+5). You can verify that by multiplying them back together and seeing what the result is. You can remember how to multiply them by the FOIL method:
First (the two X's)
Inner (in this case, the -5 and the x from the second factor)
Outer (the x from the first factor, and the +5)
Last (the -5 and +5)
x^2 -5x +5x -25
-5x and +5x cancel, so you end up with x^2 - 25 = 0
The roots of that equation are in the factored form, (x-5)(x+5), and that results in the roots: x-5 => x = 5 (move the five over to the other side and flip the sign) and x+5 => x = -5 (again, move the five over and flip the sign)
And thus, you get [-5,5] as the roots.
Not sure why your book is saying [5,5], did you make a typo or are they both actually positive? That's wrong :V
EDIT: Also, just mathematically, you can also do "x^2 - 25 = 0 ==> x^2 = 25 ==> (square-root both sides) x = 5" but doing that loses the -5 factor, and it's wrong in terms of algebraic graphing and such-like :V. Your book might be glossing that over to not confuse students, not sure :v