Solution (source code)

= Solution

Subtract the two constraints to obtain $x\cdot(a-b)=A-B$. The <Cauchy-Schwarz inequality> gives $|A-B|\leq\|x\|\,\|a-b\|$. Since $a\ne b$, division and squaring give the <distance bound from two hyperplane constraints>
$$
\boxed{\|x\|^2\geq\frac{(A-B)^2}{\|a-b\|^2}.}
$$
If $a=b$ and $A\ne B$, \b[the intersection is empty]. If $a=b\ne0$ and $A=B$, the constraints describe the same hyperplane. Its points satisfy $\|x\|^2\geq A^2/\|a\|^2$, with equality at $x=Aa/\|a\|^2$. The fraction involving $a-b$ is undefined in this case and cannot be used.

If $a=b=0$, both equations are satisfied by every $x$ when $A=B=0$, and otherwise there is no solution. These degenerate cases distinguish an inconsistent constraint from a repeated one.