You were asked for the angle in degrees, not for the component along that axis. If you know the value of BcosΘ, as well as the value of B, it is no problem to find cosΘ and consequently, Θ itself.
If that doesn't quite click for you, the following approach may be useful as and more instructive for more complicated problems.
Use the properties of the vector dot product to find the answer.
[tex]\vec A \cdot \vec B = |A||B|\cos{\theta}[/tex]
So to find the angle, [tex]\cos{\theta}=\frac{\vec A \cdot \vec B}{|A||B|}[/tex]
In your case, you want to find the angle with the x, y, and z axes respectively. So the vectors you'd need to dot would be, [tex]\vec B \cdot \hat x[/tex], [tex]\vec B \cdot \hat y[/tex] and [tex]\vec B \cdot \hat z[/tex]