Weird root of an equation I was doing this math and I found myself dealing with this equation:
$$(5-y)^{2}=(1-y)^{2}$$
Now, square rooting both sides we get,
$$5-y=1-y...(i)$$ or,
$$5-y=-1+y...(ii)$$
Now, (ii) gives us a reasonable root, which is $y=3$. However, (i) gives us a weird result, which is $5=1$. Why do I get this weird result by square rooting both sides?
 A: @user already posted a good answer. However, I would like to add to it. The equation that you/I have posted is a simple/linear equation. It can only have one acceptable root/solution. If you attempt to solve the equation as you would for a quadratic equation, you get 2 roots, but one of the roots is unacceptable. So, you are left with only one acceptable root as it is a linear equation.
A: The "weird" result doesn't depend on the manipulation you did but on the original equation itself.
Another way to solve it is by zero-product property, that is:
$$A^2-B^2=(A+B)(A-B)=0 \iff A+B=0 \,\lor\, A-B=0$$
and in your equation the case $A-B$ leds to no solution and we only keep the solution for the case $A+B=0$.
A: 
$$(5-y)^{2}=(1-y)^{2}$$
Square-rooting both sides:
$$5-y=1-y...(i)$$ or
$$5-y=-1+y...(ii)$$
Now, (ii) gives us a reasonable root $y=3$. However, (i)
gives us a weird result  $5=1$. Why do I get this weird
result by square-rooting both sides?

You weird result is due to performing an invalid step and taking square root the incorrectly: $$\sqrt{(5-y)^2}=|5-y|\not\equiv5-y.$$ (Try $y=7,$ for example.)
Here are two correct solutions:
Method A
$$(5-y)^2=(1-y)^2\\|5-y|=|1-y|$$
Continuing graphically:

$$y=3.$$
Method B
$$(5-y)^2=(1-y)^2\\25-10y=1-2y\\y=3.$$
A: 
Another way in which this question is interpreted is to consider what taking square-roots does to the pair of equations.  The system $ \ x \ = \ (5 - y)^2 \ , \ x \ = \ (1 - y)^2 \  $ is a pair of "horizontal" parabolas, both of which "open to the right" and have their vertices at $ \ (0 \ , \ 5) \ $ and $ \ (0 \ , \ 1) \ \ . $  Upon taking square-roots, each equation produces a pair of equations, each of which is represented by one "arm" of each parabola:
$$ x \ = \ (5 - y)^2 \ \ = \ \ \left\{ \begin{array}{c} \sqrt{x} \ = \ 5 - y \ \ \text{[red]} \\ \sqrt{x} \ = \ -(5 - y) \ \ \ \text{[orange]} \end{array} \right.   , $$
$$ x \ = \ (1 - y)^2 \ \ = \ \ \left\{ \begin{array}{c} \sqrt{x} \ = \ 1 - y \ \ \text{[blue]} \\ \sqrt{x} \ = \ -(1 - y) \ \ \ \text{[green]} \end{array} \right.   . $$
(ryang shows these equations expressed in terms of absolute-value curves, which appear as "V"-shapes.)
There are then four possible pairings of these equations for the arms of the two parabolas:
$$ 5 - y \ \ = \ \ 1 - y \ \ \text{[red/blue]} \ \ , \ \  5 - y \ \ = \ \ -1 + y \ \ \text{[red/green]} \ \ , $$ $$ -5 + y \ \ = \ \ 1 - y \ \ \text{[orange/blue]} \ \ , \ \ -5 + y \ \ = \ \ -1 + y \ \ \text{[orange/green]} \ \ .  $$
We use both the positive and negative square-roots here because they are both consistent with the original set of equations,  $ \ x \ = \ (5 - y)^2 \ , \ x \ = \ (1 - y)^2 \ \ . $
The intersection equation that is sensible in "standard algebra" is the "red/green" equation, $ \ 5 - y \ = \ -1 + y \ \ $ because it produces the finite value $ \ y \ = \ 3 \ \ $ [the intersection point $ \ (4 \ , \ 3) \ ] \ \ . $  We accept this solution because $ \ \sqrt4 \ = \ 5 - 3 \ = \ -1 + 3 \ \ . $
The "red/blue" and "orange/green" equations do not have solutions in standard algebra because there is no finite number that will make the left and right sides of $ \ 5 - y \ = \  1 - y \ \ $ or $ \ -5 + y \ = \ -1 + y \ \ $ equal.  We see this on the graph as the lack of intersections between the corresponding arms of the parabolas: this can be understood as the result of $ \  \sqrt{x} \ = \ 5 - y \ $ and $ \ \sqrt{x} \ = \ 1 - y \ $ being different "vertical shifts" of the single curve $ \ \sqrt{x} \ = \ -y \ \ . $  (We can say something similar for the differing "shifts" of $ \ \sqrt{x} \ = \ y \ \  $ for the orange and green curves.)
Now there is a resolution to this in more advanced practice (algebraic geometry).  If we allow $ \ y \ $ to take on a "value larger than any finite number", then the two sides of these equations can "become equal".  Mathematicians introduce the "extended plane" which includes the "point at infinity":  it is there that the red and blue or the orange and green arms intersect.  But "infinity" is not a number in standard algebra, so we say there that these equations "have no solution".
The fourth pairing  $ \ -5 + y \   = \   1 - y \ $ of the orange and blue curves appears to have the solution $ \ y = 3 \ \ , $ but this is genuinely "spurious".  Since the range for the blue curve is $ \ 1 - y \ \ge \ 0 \ \Rightarrow \ y \le 1 \ \ $ and that for the orange curve is $ \ -5 + y \ \ge \ 0 \ \Rightarrow \ y \ge 5 \ \ , \ \ y = 3 \ \ $ cannot be in the solution set for this equation.  (The "point at infinity" is where the two parabolic arms intersect, but again that is not admissible in standard algebra.)
The "safest" method of solving the original set of equations for the interpretation in standard algebra is that shown as "Method B" by ryang, as the "squared" terms conceal these complications with the square-roots.
A: $\sqrt{x^2}$ is $|x|$, not $x$.
Because eventually the only solution is $y = 3$, the RHS $1 - y$ is negative ($1 - 3 = -2$), so taking the square root of $(1 - y)^2$ is actually $y - 1$, which is exactly what $(ii)$ gives you.
