In classical mechanics, for a fixed pole $H$, the balance equation of angular momentum reads
$$\frac{d}{dt}\boldsymbol{\Gamma}_H = \mathbf{M}_H^{ext} \ ,$$
i.e. time derivative of the angular momentum of a system equals the external (!) moment, i.e. moment exerted on the system by external actions.
Let's connect the two disks with a motor (not connected anywhere else, so that no constraint exists to provide external actions), and analyze the angular momentum around the axis of rotation of the disks and the motor, called $z$-axis, of different systems and sub-systems:
- whole system disk 1 + disk 2 + motor: the angular momentum of the system is the sum of the angular momentum of its components,
$$\Gamma_z = \Gamma_z^1 + \Gamma_z^2 + \Gamma_z^m$$
and no external moment with non-zero $z$-component exist if the cylindrical hinge of disk 1 is a perfect constraint, $M_z^{ext} = 0$ and thus
$$\dot{\Gamma}_z = 0$$
- disk 1: disk 1 has angular momentum $\Gamma_z^1$ and the a torque from motor acts on it $M_{1m}$ and it's equation reads
$$\dot{\Gamma}_z^1 = M_{1m}$$
- disk 2: disk 2 has angular momentum $\Gamma_z^2$ and the a torque from motor acts on it $M_{2m}$ and it's equation reads
$$\dot{\Gamma}_z^2 = M_{2m}$$
- motor: motor has angular momentum $\Gamma^m_z$ and the same and opposite moments it provides to the disks act on it (third principle of dynamics), $M_{m1} = - M_{1m}$, $M_{m2} = - M_{2m}$, i.e.
$$\dot{\Gamma}_z^m = M_{m1} + M_{m2} \ .$$
Summing the equations for the single components, you can easily realize that the equation for the whole system holds, providing the conservation of the $z$-component of the angular momentum of the whole system.