The r(s) and the ds both come from being "dummy" variables. What you're doing here to solve the problem is separating the variables: divide both sides by M(t), and then integrate w.r.t. t. The integral on the RHS is equivalent to an indefinite integral w.r.t. t.
Does that make sense?