Hello.
The Magnetic Field lines are concentric circles for a Straight wire.Hence the points above and below point B should not contribute to the magnetic field at A.
So Why do we integrate the expression across the whole length of the wire to get magnetic field at point A?