First note that $A$ is arc-connected. This follows from the fact that a line segment which is a part of the graph of $ax + b$ where both $a,b$ are rational and $a$ is not $0$ contains only points from $A$. With this in mind, given two points, say $(x_1,y_1), (x_2,y_2) \in A$ one can constructs an arc connecting them and contained in $A$. The process is as follows. If both points are rational this is easy ( just take line segment connecting them). If one of them, say $(x_2,y_2)$ has both coordinates irrational then take a point with distance, say $< 1/2$ from it which has both coordinates rational and connect it to $(x_1,y_1)$ by an arc contained in $A$. Then, in the next step one finds a point, say with distance $<1/4$ from $(x_2,y_2)$ and extend the first arc by a line segment to its end to the new point. Then you continue by induction. You have a family of arcs which converges (uniformly) to and an arc joining $(x_1,y_1)$ and $(x_2,y_2)$. Similar construction works if both $(x_1,y_1), (x_2,y_2)$ are irrational.
So, what matters here is not so much that $A$ is arc connected but the construction itself. That is, that we can build "circle like" (that closed) curves which are contained in $A$. Then to show that $B$ is not connected you take interior points and exterior points of such curve. Both sets are non-empty and open and their sum is $B$. So, $B$ is not connected hence it can not be arc-connected.