Consider a mass dangling from a vertical spring. The equation of motion is
$$ ma = mg -k(x-x_0) $$
where $x_0$ is the position of the end of the unstretched spring, and I’m using a downward-positive coordinate system. This system has an equilibrium at
$$ x-x_0= \frac{mg}k $$
The potential energy for a mass on a vertical spring is
$$ U= -mgx +\frac12 k(x-x_0)^2 =\frac12 k \left( x-\left(x_0+\frac{mg}k\right) \right)^2 $$$$ U= -mgx +\frac12 k(x-x_0)^2 =\frac12 k \left( x-\left(x_0+\frac{mg}k\right) \right)^2 + \text{constant} $$
That is, the potential energy is the sum of a linear gravitational term and a quadratic term from the spring. However, you may recall from algebra that a quadratic function plus a linear function is just a quadratic function with the same curvature but a different minimum. If you enjoy algebra and completing the square, you can find the second equality.
So oscillations of a dangling spring about its effective equilibrium are described by simple harmonic motion with the same frequency $\omega^2=k/m$ as the free spring.
Your contrived distance-dependent friction force,
$$ ma=-m(\mu+kx)g $$
has exactly the constant-plus-linear form of a dangling spring, so you can find the stopping position by treating the stopping process as a partial oscillation, from $x=0$ (with nonzero initial velocity) to the oscillation’s turning point.