HINT $\rm\ \ 27 = 3^3\ \Rightarrow\ 27^{\:5} = 3^{15}\:,\ $ so $\rm\ 3^{m}\ |\ 3^{15} \iff\ m \:\le\: \cdots$
NOTE $\ $ Despite a remark elsewhere, this has little to do with unique factorization of integers. Rather,$\:$ it is a consequence of $\rm\ c\: =\: 3 \:\ne\: \pm1\:,\:0\ $ implies that $\rm\ c\ $ is a nonunit and $\rm\ c\ $ is cancellable, i.e. $\rm\ a\:c = b\:c\ \Rightarrow\ a = b\:.\:$ These two properties easily imply $\rm\ c^m\ |\ c^{\:n}\ \iff\ m\:\le \:n\:,\:$ namely
LEMMA $\rm\ \ c^{\:m}\ |\ c^{\:n} \iff\ m\le n\:\ $ for a cancellable nonunit $\rm\:c\:$ in a ring $\rm\:R\:,\ m,n\in\mathbb N$
Proof $\ (\Leftarrow)\ $ Clear. $\ (\Rightarrow)\ $$\rm\ \ m>n,\:\ c^{m}\ |\ c^n\:$ in $\rm\:R\ \Rightarrow\ \exists\: d\in R:\ d\ c^{m}\! =\: c^{\:n}\:.\:$ Cancelling $\rm\:n\:$ factors of $\rm\:c\:$ yields $\rm\ d\:c^{m-n} = 1\ $ so $\rm\ m > n\ \Rightarrow\ c\:|\:1\:,\:$ contra $\rm\:c\:$ nonunit. Hence $\rm\ m\le n\:.$
As a corollary we infer that the above lemma is true for $\rm\:c\:$ being any nonzero nonunit element of a domain (in particular for any nonzero prime element of a UFD = unique factorization domain). But the essence of the matter has nothing at all to do with the property of an element being prime, or with the existence or uniqueness of factorizations into irreducibles.