**Your Solution**

You have made a good start on the problem, but you have not made use of the information that the outer radius of the spool is $n$ times the inner radius.

Your assumption that $\frac{dl}{dt}=u\cos\theta$ is not quite correct. This is the component of velocity of the top end of the rope in the current direction of the rope. However, the bottom end of the rope also has a component of velocity in the same direction, which is $v\sin\theta$. So you should have $$\frac{dl}{dt}=u\cos\theta-v\sin\theta$$ Also note that $\frac{dx}{dt}=-v$ because $x$ is decreasing. Then your equation reduces to $u=u$.

However, you are almost there. $\frac{dl}{dt}$ tells you how fast the string is unwinding from the spool. This is $\frac{v}{n}$. Then $$\frac{v}{n}=u\cos\theta-v\sin\theta$$ $$v=\frac{\cos\theta}{\sin\theta+\frac{1}{n}}u$$ which is the same as my solution below, but simpler!

**Approximate (Longer) Solution**

Suppose that when the string is vertical it has length $a$. This is its maximum length. When the spool has rolled a distance $x$ to the right of the vertical a length $\frac{x}{n}$ of the string has wound onto the inner drum; the length of the string in this position is $a-\frac{x}{n}$ (see diagram below). The height of the top of the string above the centre of the spool is now $y$ where $$y^2=(a-\frac{x}{n})^2 - x^2$$

**Note :** I am assuming that the inner radius $r$ of the spool is very much smaller than the maximum length $a$ of the string. Then as the spool rolls on a horizontal surface the point at which the string is attached moves approximately along a horizontal straight line. Without this assumption, the point of attachment moves from the right side of the inner drum when the string is vertical to the top of the inner drum when the string is horizontal. If $r$ is comparable with $a$ this motion makes a significant difference to the length of the string and complicates the calculation (see **Exact Solution** below).

Differentiating the above expression wrt time we get $$yu=(a-\frac{x}{n})\frac{v}{n}+xv$$ $$a-\frac{x}{n}=n(py-x)$$ where $u=\dot y, v=-\dot x$ are the vertical and horizontal speeds of the ends of the string and $p=\frac{u}{v}$. Substituting into the 1st equation to eliminate the unknown initial length $a$ of the string, we get $$y^2=n^2(y-px)^2-x^2$$ Divide by $y^2$ and write $\frac{x}{y}=t=\tan\theta$. Then : $$1=n^2(p-t)^2-t^2$$ $$\frac{u}{v}=p=t + \frac{1}{n}\sqrt{1+t^2}$$ I have taken the +ve root because when $t=0$ then $v$ must be +ve. In fact $v=nu$ in this position, as expected. Therefore $$v=\frac{\cos\theta}{\sin\theta+\frac{1}{n}}u$$

**Exact Solution**

If the radius $r$ of the inner drum is significant compared with the length of the string then after the right end $U$ of the spool has moved distance $x$ to the right, the point of contact between string and spool rises from $O$ which is level with the centre $S$ of the spool when $\theta=0$, to $T$ which is above the level of the centre $S$ and also a little closer to $O$. See following diagram.

As before, an amount $\frac{x}{n}$ of the string has been wound onto the inner drum at point $U$. However, the contact point has moved round to $T$, so an additional arc length $UT=r(\theta-\phi)$ has been wound onto the spool.

Angle $QTS$ is a right angle, therefore $$QS^2=OQ^2+OS^2=QT^2+ST^2$$ $$y^2+(x-r)^2=(a-\frac{x}{n}-r(\theta-\phi))^2+r^2$$ This is very much more complicated than the **Approximate Solution** above. It will result in a transcendental equation, which can only be solved numerically. This is because we shall again have to make trigonomentric substitutions to eliminate $x, y, \phi$ and will be left with eg $\theta, \tan\theta$ in the same equation.

I shall not attempt to solve this.

**Comment**

I have assumed that the problem is purely one of geometrical constraint and kinematics. I have assumed that the string never becomes slack. I think this assumption is correct. But I had wondered, Is it possible that the spool could accelerate so much that the string does becomes slack at some point? It is not obvious why this does not happen.