How my professor derived this CDF? This was an example problem my professor went over in class. 
Let $X =$ uniform $(1,4)$ where $Y=(X-2)^2$ Find the CDF. 
He went on to derive: 
$F_Y(y)=P(Y\leq y) = P((x-2)^2 \leq y) = P(-\sqrt{y}\leq (x-2) \leq \sqrt(y))$
= $P(2 - \sqrt{y} \leq x \leq 2 + \sqrt{y})$
Then he said the CDF is: 
$$F_X(x)= \begin{cases} 
      0 & x\leq 1 \\
      \frac{x-1}{3} & 1\leq x\leq 4 \\
      1 & x\geq 4
   \end{cases}
$$
I am very confused as to how he derived this CDF. Could someone please explain? 
Edit: Unless he is wrong?

The CDF given was simply that of the variable $X$, it's not the CDF for $Y$.  Note that since this is a uniform distribution on $(1,4)$ then the density is given by $p_X(x) = \frac{1}{3}$.  Then:
$$
F_X(x) \;\; =\;\; P(X\leq x) \;\; =\;\; \int_1^x \frac{1}{3}d\alpha \;\; =\;\; \frac{x-1}{3}.
$$
The values on the other parts of the domain are because $P(X\leq 1) = 0$ and $P(X\geq 4) = 1$.  
