here is the problem and solution:

http://i30.tinypic.com/2w2mnap.jpg

why they divide into two cases?

then they find a magnetic field

but we dont have any electricity flowing??

the i recognized the formula for a magnetic field from a wire

but when we find a the formula from the biotsavart law

the oly direction is dlX$\displaystyle \hat{r}$