Find the vector v with magnitude 2.7 in the direction of w = < 1, -2, -1 >

This is what i have so far and i will point out where i am stuck.

so, filling in for w we have

Now, from here do i just multiply the 2.7 to the numerator?

A Similar problem in my book, the solution manual does something weird and i cant figure it out like

Then, they go to this final step and i dont see how they are doing that?