Answer
5.81
Work Step by Step
The component of $\vec{a}$ along the direction of $\vec{b}$ is equal to $|\vec{a}|\cos\theta$ where $\theta$ is the angle between $\vec{a}$ and $\vec{b}$.
But $|\vec{a}|\cos\theta=\frac{|\vec{a}||\vec{b}|\cos\theta}{|\vec{b}|}=\frac{\vec{a}\cdot\vec{b}}{|\vec{b}|}$
$\vec{a}\cdot\vec{b}=26$ (we found that in part(b) )
$|\vec{b}|=\sqrt {2.0^{2}+4.0^{2}}=\sqrt {20}=2\sqrt 5$
Therefore, the component of $\vec{a}$ along the direction of $\vec{b}$
$=\frac{26}{2\sqrt 5}=5.81$