This is much easier to understand when drawn out, so please forgive me if the following explanation is confusing.
Say we have two vectors,

and

and we are trying to determine the vector resolute of

in the direction of

. What this means is that we are trying to determine how much of vector

lies in the direction of vector

.
Let's take a simple example to illustrate. Let

and

Notice that

is in the direction of the x-axis. So if I wanted to find the vector resolute of

in the direction of

, what I want to actually find is 'how much of

lies on the x-axis'. Since vector

has already been nicely split into

and

components for us, we know that the answer to this is just

, which was the x-axis component of

.
What makes things tricky is that usually neither vector lies on the x-axis or y-axis. This means that their direction will be something totally random and we can't easily answer the question 'how much of

lies in the direction of

?'. How do we overcome this?
Join the two vectors such that their tails both start at the same point. Now, draw a line starting from the head of vector

towards vector

such that it is perpendicular to vector

. If this line doesn't actually pass through vector

, extend vector

so that it does. Now, you should have a right-angled triangle with vector

as the hypotenuse.
What we have done here is
resolve vector

in two directions. One is parallel to vector

(it lies on vector

in our diagram) and one is perpendicular to vector

. The side of the right-angled triangle that lies on vector

is our
vector resolute.
Let

be the angle between our two vectors. The length of this side is thus given by

. This length is known as the
scalar resolute.
Since the magnitude of

is 1, this expression can be rewritten as:

Hence, the scalar resolute of

in the direction of

is

.
Since the vector resolute is in the same direction as

, and we know that

has a magnitude of 1, all we need to do is multiply the length of the side by

.
Ie: The vector resolute is given by the scalar resolute multiplied by the unit vector of

.
As a formula, this is: Vector resolute of

in the direction of
b_{hat})