We will use right-hand thumb rule to get the answer.
(a) In the straight wire A, current is flowing in vertically downwards direction; therefore, the direction of magnetic field around it will be clockwise.
(b) In the straight wire B, current is flowing in vertically upwards direction; therefore, the direction of magnetic field around it will be anticlockwise.