Issue with solution of an classical angular momentum problem I was doing a Introductory physics homework. On a frictionless table two ideal strings with masses at their ends can spin freely as seen in the figure.

Then, both masses collide elastically. I have to derive the following relation $a^2m_1(\omega_1-\omega')=b^2m_2(\omega_2'-\omega)$ being $\omega'$ the angular velocity after the collision.
So my teacher uses conservation of angular momentum, adding the scalar shape of both angular moments with respect to their centers of rotation. But, this is correct? I mean, he taught us all the physics on the vectorial form, so doing the problem without explaining what he did confuses me. Aren't we supposed to first choose an origin to calculate the angular momentum?
This is how my professor does the exercise: $\sum L=a^2m_1\omega_1+b^2m_2\omega_2$
How i suposse that can i solve the problem:
$\sum L=\vec{r_{1O}}\times\vec{p}_1+\vec{r_{2O}}\times\vec{p}_2$
being $O$ an arbitrary origin.
 A: After thinking about this more, I do not think the the angular momentum of $m_1$ about A plus the angular momentum of $m_2$ about B is conserved.
Here is how I solve the problem using $\tau \enspace\Delta t = \Delta L$, where $\tau$ is torque and $L$ is angular momentum. For $m_1$ considering the torque about A due to the collision, $F_{m_2onm_1}\enspace a \enspace \Delta t = m_1a^2(\omega _1^{'} - \omega _1)$.  For $m_2$ considering the torque about B, $F_{m_1onm_2} \enspace b\enspace \Delta t = m_2b^2(\omega _2^{'} - \omega _2)$. $F_{m_1onm_2} = -F_{m_2onm_1}$. So $m_1a(\omega _1^{'} - \omega _1) = - m_2b(\omega _2^{'} - \omega _2)$.
You obtain the same answer using the conservation of linear momentum:    $m_1(v_1^{'} - v _1) + m_2(v _2^{'} - v_2) = 0$ since $v_1 = a\omega_1$ and $v_2 = b\omega_2$. (The tension forces on the masses from the strings are negligible compared to the force of impact during the collision.  After the collision the string tensions just restrict the motion to circular.)
I do not think the the angular momentum of $m_1$ about A plus the angular momentum of $m_2$ about B is conserved.  (I share your concern about not using a common point for evaluating the angular momentum.)
For an elastic collision, kinetic energy is also conserved, and that along with the earlier relation allows you to solve for $\omega_1 ^{'}$ and $\omega_2 ^{'}$ in terms of $\omega_1$ and $\omega_2$.
Trying to solve for the angular momentum using a common point, say A, is complicated since you have the "hinge" force/torque at B to consider, as pointed out earlier by @ SteelCubes.
See If a ball spinning on a rod hits another ball, what is conserved linear or angular momentum? on this exchange.
A: Actually, angular momentum is a vector quantity and you got it right. What you missed is angular momentum is perpendicular to the plane of motion. And here, both the collisions and the independent motions of the ball are occurring in the same plane (lets say, plane of your notebook). So, the angular momenta must be in the direction perpendicular to the plane of notebook. (I am already assuming you got it- why angular momentum is conserved). So, here, you're left with 2 vector quantities (angular momenta of ball 1 and ball 2) directed along same line. (Hope it doesn't confuse you, but angular momentum is a free vector. So, all parallel and anti-parallel angular momentum vectors can be treated to be vectors along the same line). Let's assume this direction ^n . And you must be knowing that a vector directed along ^n of magnitude A is A (^n) and A is a scalar. And any parallel vector can be added or subtracted to it as if they were scalars as well.
