An exact algebraic solution of two harmonic modes coupled through the angular momentum