The following is a problem from Patrick Hamill's A Student's Guide to Lagrangians and Hamiltonians.
A string passes over a massless pulley. Each end is wound around a vertical hoop, as shown in the figure below. The hoops tend to descend, unwinding the string, but if one hoop is much more massive than the other, it can cause the lighter hoop to rise. The hoops have masses $m_1$ and $m_2$ and radii $R_1$ and $R_2$. Show that the tension in the string is $\tau = \dfrac{gm_1m_2}{m_1+m_2}$.
Q: What is the approach for defining the constant string length constraint, when the string is unwinding as is the case here?