Consider the function f:=x->sqrt(a* x + b) + sqrt(c*x + d) . If a*c>=0 then f is a monotonic function. Therefore, the equation sqrt(a* x + b) + sqrt(c*x + d) = m can not have two solutions. So the necessary condition is a*c<0 . For definiteness, let a>0 . From these conditions and from the conditions a*x+b>=0, c*x+d>=0 we get -b/a<=x<=-d/c . Therefore, in the limited ranges of parameters a, b, c, d all the solutions can be found by the usual brute force.
The following code finds all equations with integers a=1 .. 10, b=-10 .. 10, c=-10 .. -1, d=-10 .. 10, each of which has exactly two integer solutions:
for a to 10 do
for b from -10 to 10 do
for c from -10 to -1 do
for d from -10 to 10 do
if -b/a<=-d/c then s:=floor(-b/a): t:=ceil(-d/c):
for x from s to t do
if type(u, integer) and type(v, integer) then M:=[op(M), [x, u+v]]: fi:
if nops(M)=2 and M[1,2]=M[2,2] then L:=[op(L), [a,b,c,d,M[2,2],[M[1,1],M[2,1]]]]: fi: fi:
od: od: od: od:
ListTools[Search]([1, 5, -1, 8, 5, [-1,4]], L);
For example, the list [1, -9, -1, 10, 1, [9, 10]] corresponds to the equation sqrt(x-9)+sqrt(-x+10)=1 with the roots 9 and 10. The list L contains all the solutions in the specified ranges. Received 319 solutions. Displayed first 50 solutions. The original equation is also in the list L at position 82.