The property of your two data sets is that of linear separability, simply, that there is a line that separates them.
A lot of machine learning is devoted to finding linear classifiers, which are lines that perform the separation you are interested in.
As you are talking about lines, I'll assume that your points lie in the plane. What you want to do is find values $w_1$, $w_2$ and $w_3$, such that for all points $(a_1,a_2)$ in set $A$, $w_1 a_1+w_2a_2\ge w_3$ and for all points $(b_1,b_2)$ in $B$, $w_1 b_1+w_2b_2<w_3$. Thus, the inequality $w_1 x+w_2y\ge w_3$ can be seen as a classifier for set $A$.
There are loads of machine learning algorithms for determining an optimal line (linear regression, logistic regression, and so forth). These will find values for $w_1,w_2,w_3$ based on some error metric. Then you can test whether all of the points are correctly classified. That is, whether all of the values in $A$ satisfy the equation above and similarly for $B$.
As you are only interested in whether such a line exists, you needed use existing techniques (though that probably would be simpler). Simply set up the following collection of equalities in terms of free variables $w_1,w_2,w_3$.
$w_1 a^i_1+w_2a^i_2\ge w_3$ for each $i=1,..,|A|$, where $A=\{(a^1_1,a^1_2),\ldots,(a^{|A|}_1,a^{|A|}_2)\}$.
$w_1 b^j_1+w_2b^j_2< w_3$ for each $j=1,..,|B|$, where $B=\{(b^1_1,b^1_2),\ldots,(b^{|B|}_1,b^{|B|}_2)\}$.
If these constraints are consistent, then a line exists.