In definite integrals, the integration variable is always dummy. Mathematica has chosen K[1]
in the hope that you had not used that variable for other purposes. The result seems correct:
sol = DSolveValue[Demand[t] == r[t], p, t];
Simplify[(Demand[t] == r[t]) /. p -> sol]