$${\int_0^D dx = \int_0^t \left( \frac{2Pt}{m} \right)^{1/2} = \left( \frac{2Pt}{m} \right)^{1/2} \int_0^t t^{1/2}\, dt}$$