You have a system of 3 equations of one variable x. Such a system can be overdetermined. Even
solve ([a = (p-x)*c, b = (q-x)*d, a + b = 0], [x]);
results in an empty solution
[]
because a+b=0 isn't true except for special values of the constants a and b. A constant expression will be true in this context only if it can be proved that is true for all possible assignment to the parameters.
I think you actually wanted to solve the system
solve ([a = (p-x)*c, b = (q-x)*d, a + b = 0], [x, a, b])
with three variables x, a, b and the constants c,d,p,q.
Maxima calculates the solution
[[x = (d*q+c*p)/(d+c),a = (c*d*p-c*d*q)/(d+c),b = -(c*d*p-c*d*q)/(d+c)]]
where x has the value you expected.
solve ([ (p-x)c + (q-x)d = 0], [x]);
then it works as expected.
– Rob190 Apr 14 '19 at 21:26