a) Suppose the field is not parallel to the sheet, as shown:
Reverse the direction of the current. By the Biot-Savart law, B should reverse direction.
Now rotate the sheet by 180 degrees about a line perpendicular to the sheet. B should now point down rather than up, for the same current configuratino as first shown -- in contradication to our initial assumption.
The only direction of B which is preserved under these transformations is one directed horizontally.
b) Evaluate the line integral of Ampere's law around the rectangular loop shown. By the symmetry of the current sheet, B will have the same magnitude at the same distance above and below the sheet; the upper and lower sides of the amperian loop are constructed to be the same distance from the sheet, each having length a.
If the line integral is evaluated counterclockwise, the contribution of each of these sides is Ba. There will be no contribution from the other two sides, since B is perpendicular at all points. So the line integral around the amperian loop is 2Ba.
The enclosed current is the linear current density lambda times the length a of the side of the loop; ienc = lambda a.
Thus by Ampere's law, B = mu0 lambda/2, directed as shown.