To find out the unit vector in the same direction of other vector, we can calculate the magnitude of its vector and then divide all coordinates by the magnitude, remember that the definition of a unit vector is that its magnitude is 1.
We can calculate the magnitude of a 2D vector as

I'll call the vector (-4, 7) as v, so the magnitude of v is

So the unit vector that i'll call as v with an hat is

The vector divided by its magnitude, when we divide a vector by a scalar it's the same as divide all the coordinates, so

We can also remove the square root from the denominator, then

Use what you prefer!
Hope you liked it
Questions? Ask me in the comments