The separation of variables went well, and in general outline the calculation was along the right lines. However, there are some problems of detail.
An antiderivative of $\frac{dP}{M-P}$ is $-\ln(|M-P|)$. In your work, the minus sign is missing.
It is always good to check by differentiating whether you have integrated right. The derivative of $\ln(M-P)$ with respect to $P$ is $-\frac{1}{M-P}$ (Chain Rule). Not quite the $\frac{1}{M-P}$ that is needed, but the fix is easy.
Later there is a typo, there is an $x$ where $t$ is intended. There is also a problem with the simplification of $e^{kt+c}$. Note that $e^{u+v}=e^u e^v$.
To do things right, we integrate and get $-\ln(|M-P|)=kt +c.$ Either multiply both sides by $-1$, and take the exponential of both sides, or exponentiate directly. We do the first. So we have $\ln(|M-P|)=-kt -c$, and therefore $|M-P|=e^{-c}e^{-kt}$, so $M-P=\pm e^{-c}e^{-kt}$.
For simplicity, let $C=\pm e^{-c}$. We then get $P=M-Ce^{-kt}.$ To find the appropriate value of $C$, we need more information, such as an initial condition, the value of $P$ at a certain time $t$, often (but not necessarily) at $t=0$. In particular, if $P(0)=0$, it turns out that $C=M$.
The limit as $t\to\infty$ is easy to find even if we are not given an initial condition. I assume that the constant $k$ is positive. Then, as $t\to\infty$, we have $e^{-kt}\to 0$, so the limit of $P(t)$ is $M$.