Why is this correct? Why am I allowed to simplify just the top of this faction and leave the bottom? I thought whatever you do to the top you must do to the bottom

There's no reason why the 5 at the right hand side becomes 25 in the second line. Also, you're missing the [tex]\pm[/tex] sign when taking the square root of both sides. Here are the correct steps.
Start with
[tex]x^2+x^2=5[/tex]
Add like terms:
[tex]2x^2=5[/tex]
Divide both sides by 2:
[tex]x^2=\dfrac{5}{2}[/tex]
Take the square root of both sides, considering both signs for the right hand side:
[tex]x=\pm\sqrt{\dfrac{5}{2}}[/tex]