Answer
a) $\vec B=-(4.33\;{\rm m})\;\hat i+(2.5\;{\rm m})\;\hat j$
b) $\vec B=-(2.5\;{\rm m})\;\hat i+(4.33\;{\rm m})\;\hat j$
Work Step by Step
a)
First of all, we need to find the angle between vector $\vec B$ and the positive $x$-direction.
From the geometry of the first figure below;
$$\alpha_B=90^\circ+60^\circ=\bf 150^\circ $$
So, the horizontal component of vector $\vec B$ is given by
$$B_x=|\vec B|\cos\alpha_B=5\cdot \cos 150^\circ=\color{red}{\bf -4.33}\;\rm m$$
And the vertical component is given by
$$B_y=|\vec B|\sin\alpha_B=5\cdot \sin150^\circ=\color{red}{\bf 2.5}\;\rm m$$
Therefore,
$$\vec B=-(4.33\;{\rm m})\;\hat i+(2.5\;{\rm m})\;\hat j$$
b)
We need to find the angle between vector $\vec B$ and the positive $x$-direction.
From the geometry of the second figure below;
$$\alpha_B=60^\circ+60^\circ=\bf 120^\circ $$
$$B_x=|\vec B|\cos\alpha_B=5\cdot \cos 120^\circ=\color{red}{\bf -2.5}\;\rm m$$
$$B_y=|\vec B|\sin\alpha_B=5\cdot \sin120^\circ=\color{red}{\bf 4.33}\;\rm m$$
$$\vec B=-(2.5\;{\rm m})\;\hat i+(4.33\;{\rm m})\;\hat j$$