Reasoning for equality of Cauchy Schwarz inequality holds

I am trying to understand the proof of the Cauchy-Schwarz Inequality. I understand that, in addition to that, there is a remark that the equality holds if and only if one of term is scalar multiple of the other. And in the book, this is the proof given.

I know there are many alternative proof on MSE but I wanted to understand argument in book.

It is as follows :
$$\langle x,y\rangle=\Vert x\Vert \,\Vert y\Vert\implies\left\langle\frac {x}{\Vert x\Vert} ,\frac{y}{\Vert y\Vert}\right\rangle=1\implies\frac {x}{||x||}=\frac{y}{||y||}$$ Thus,$$x= \Vert x\Vert\,\frac{y}{\Vert y\Vert}.$$
I don't understand second to last line Any help will be appreciated.
I had associated screenshot of proof   • The second line is unclear, as you say. I suggest you post the whole proof of the CS inequality, including the part where the inequality is shown. Then, we can see if any inequalities/results from that proof were used implicitly in this second line. The answer below uses the dot product of vectors with the angular interpretation, but the issue is that the CS inequality is valid for all inner products, not just those associated with a dot product. Aug 10 '18 at 12:18
• $x/||x||$ and $y/||y||$ are unit vectors with inner product 1. It follows that they are equal, but this is not obvious (that is, it is where the content of the argument lies). Perhaps this assertion is proved somewhere else? Aug 10 '18 at 12:20
• @астонвіллаолофмэллбэрг I had uploaded screen shot of proof. Aug 10 '18 at 12:27
• Have you read the earlier part of the equality proof for unit vectors? Aug 10 '18 at 12:30
• @CalvinKhor .Yes I had read the proof.But I don't understand equality argument. Aug 10 '18 at 12:35

Near the start of the proof, they show that for unit length vectors $$\langle x-y, x-y\rangle = 2 - 2\langle x,y\rangle.$$ But recall that $\langle u,u\rangle = 0 \iff u = 0$. Thus if $\langle x,y\rangle = 1$, then $$\langle x-y, x-y\rangle = 2 - 2 = 0 \implies x -y = 0 \implies x = y$$
Instead of assuming $x$ and $y$ are unit length, if we repeat these calculations with $\frac{x}{\Vert x\Vert}$ and $\frac{y}{\Vert y\Vert}$, you obtain precisely their proof.
If $\langle x,y\rangle=1$, from the above chain of inequalities we deduce that $\langle x-y,x-y\rangle=0$.
(of course, this in the case $\|x\|=\|y\|=1$, as stated in the book).