This DE is a "variables separable" equation:
dy/[(M-y)y] = k dx
(1/M){[1/(M-y)]+(1/y)} = 1/[(M-y)y]
Integrate this partial fraction decomposition to
(1/M)[ln(M-y) + ln y] = kx + C
This is the general solution. You should be able to answer the questions with this information.