Questions:
Determine the speed of the object $M$ as a function of $x$, if the right part of the line ($B$) moves horizontally with a constant velocity $v_{0}$ and if $B$ and $M$ coincide when $x = 0$.
This is from a first year single variable calculus textbook that does not treat physics or engineering.
Attempted solution:
Here is an image of the problem:
From the question, we know that the length of the string is $2h$. The amount that goes from B to the top (let us call that c) can be found with the Pythagorean theorem:
$$c^2 = h^2 + x^2 \rightarrow h = \sqrt{c^2-x^2}$$
Since we know that:
$$c+h = 2h$$
We have:
$$h = \sqrt{h^2-x^2}$$
Taking the derivative:
$$\frac{dh}{dt} = \frac{1}{2 \sqrt{h^2-x^2}} 2h \frac{dh}{dt}$$
However, this does not take $v_{0}$ into account. Since it is in the direction to the right instead of up (which the mass experiences), there has to be some angle to work with:
$$\tan \theta = \frac{h}{x}$$
However, I am a bit stuck here. Do not seem to find any productive way to introduce $v_{0}$.

Let $y$ be the distance from the pulley to $M$. As you say, $c=\sqrt {x^2+h^2}$ and the length of the string is $2h$, so $y=2h-c=2h-\sqrt {x^2+h^2}$. Now you can take $\frac d{dt}$ of both sides, then set $\frac {dx}{dt}=v_0$