Proof
(related to Proposition: Congruence Modulo a Divisor)
 By hypothesis, $a,b$ are integers, $n > 0, m > 0$ are positive integers, and $m\mid n.$
 By definition of divisor, there is an integer $c > 0$ such that $n=cm.$
 By hypothesis $a(n)\equiv b(n),$ which means $a(cm)\equiv b(cm).$
 By the definition of congruence, $cm\mid (ab).$
 By the divisibility law no. 3, since $m\mid cm$, it follows $m\mid (ab).$
 Therefore, $a(m)\equiv b(m).$
∎
Thank you to the contributors under CC BYSA 4.0!
 Github:

References
Bibliography
 Landau, Edmund: "Vorlesungen über Zahlentheorie, Aus der Elementaren Zahlentheorie", S. Hirzel, Leipzig, 1927