a(x^2 +x) + c(x+1)=0
=> ax^2 + ax + cx +c =0
=> ax^2 + (a+c)x +c = 0
So discriminant D = (a+c)^2 - 4ac
=> D = a^2 + 2ac + c^2 -4ac
=> D= a^2 - 2ac + c^2
=> D = (a-c)^2
The square confirms that the roots are real and rational. Since (a-c)^2 is always greater than or equal to zero and is always a perfect square(making it rational).
But if a = c then,
D = (a-c)^2 = (a-a)^2 = 0
And we know when D=0 it has one and only one real root.
Therefore, to satisfy the condition D>0 ie having 2 real roots a must not equal to c.