You can solve this with the lagrangian formalism. Let the total length of the string be $x+y=l$. Now since the cylinder is rolling, we also know $x = \phi R$ with $R$ the radius of the cylinder and $\phi$ the angle it has rotated through. we then have a constraints
$$
f_1 = x + y - l = 0\quad \text{and}\quad f_2 = x-R\phi =0
$$
Now consider the kinetic and potential energies of the system. For the cylinder, we have the typical
$$
T=\frac{1}{2}I\dot{\phi}^2 + \frac{1}{2}M\dot{x}^2
$$
and for the hoop we then have
$$
T = \frac{1}{2}m\dot{y}^2
$$
and
$$
U = -mgy
$$
Now use
$$
\frac{d}{dt}\frac{\partial L}{\partial \dot{q}_{i}}-\frac{\partial L}{\partial q_i}=\sum_{j}\lambda_j \frac{\partial f_j}{\partial q_i}
$$
with $\phi$ and $y$ and $x$ as your variables. I think this will let you solve this system. First let's consider the $\phi$ piece:
$$
\frac{d}{dt}\frac{\partial L}{\partial \dot{\phi}}-\frac{\partial L}{\partial \phi}=\lambda_2 (-R)=I\ddot{\phi}
$$
for the $x$ part we have
$$
M\ddot{x} = \lambda_1+\lambda_2
$$
and for $y$ we get
$$
m\ddot{y}-mg = \lambda_1
$$