Your argument is fine. It simplifies - to solve the equations simply add them, which immediately yields the modular contradiction: $\,\color{#c00}5$ divides $\color{#0a0}{14} \color{#c00}\Rightarrow\!\color{#0a0}\Leftarrow\:\!$. Quicker and simpler: compare the prime factorization lengths (#primes) on both sides of $\,72^{\rm N} 108^{\rm M} =2^7 3^7$ as below:
$$\begin{align}\text{ Suppose that}\ \ \overbrace{(2^{\large\color{#c00}3} 3^{\large\color{#c00}2})^{\rm N}(2^{\large\color{#c00}2} 3^{\large\color{#c00}3})^{\rm M}}^{\textstyle 72^{\rm N} \ 108^{\rm M}\!\!\!\!}\! &\,=\, 2^{\large\color{#0a0}7} 3^{\large\color{#0a0}7}\\[.2em]
\text{$\color{#90f}{\rm count}$ #primes}\:\Rightarrow\: {\color{#c00}5\:\!{\rm\small N}\ \:\!+\:\!\ {\color{#c00}5\:\!{\rm\small M}}} &\,=\, \color{#0a0}{14}\ \color{#c00}\Rightarrow\!\color{#0a0}\Leftarrow\end{align}\qquad$$
Generalization $ $ Define $\,\color{#90f}{\ell(n)}\,$ as the $\rm\color{#90f}{count}$ of all primes (length) in the unique prime factorization of $\:\!n.\,$ The above generalizes to: $\,\gcd(\ell(a),\ell(b))\mid \ell(a^n b^m)\ [= n\:\!\ell(a)+m\:\!\ell(b)].\,$ The question is the special case when $\, \ell(a) = \ell(b)\ [= 5]\, $ thus $\,\ell(a)\mid \ell(a^nb^m).\,$
Remark $ $ Note this "global" method of counting the total number of primes ends up being simpler than the "local" methods of comparing the powers of each prime (e.g. using valuations $\,\nu_p).\,$ While generally the local methods can discriminate better, this extra work may not be needed to handle simple problems like this.
E.g. the global method quickly proves irrational square roots of odd length $n\,$ (e.g. prime $n)\,$ by $\,\sqrt n =a/b \Rightarrow nb^2 = a^2\,$ contra parity: $\,\ell(a^2)$ is even but $\,\ell(nb^2)\,$ is odd by $\,\ell(n)\,$ odd. But this method doesn't handle even length $\,n,\,$ so we need to resort to local methods to handle e.g. $\sqrt 6,\,$ e.g. by comparing the parity of the length (power) of $2$ on both sides (i.e. apply valuation $\nu_2)$.
This length "metric" $\,\ell(n)\,$ often proves handy, e.g. it can be used as a metric for descent in certain generalizations of the Euclidean algorithm to arbitrary PIDs, see the Dedekind Hasse PID test.
Notice that the proof uses only length uniqueness of prime factorizations. Domains satisfying this "half" of the common definition of unique prime factorization are known as half-factorial domains. A classical result of Carlitz shows that a number ring is half-factorial iff it has class number $\le 2.\,$ Recent work generalizes this, e.g. see here. One interesting simple result is: if a domain is not a UFD then that is witnessed by the existence of an equal-length nonunique factorization, see Coykendall and Smith, Unique factorization domains.