It's because the discriminant is a perfect square. So if m is rational, the solutions will be rational as the discriminant is a perfect square and the coefficients are all rational, for m ≠ 5/3.
(If m = 5/3, then the given equation is a linear one rather than quadratic, as the quadratic term...